Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: tests/compiler/dart2js/type_checker_test.dart

Issue 2939063002: Strong mode cleaning of many dart2js tests. (Closed)
Patch Set: Use ClassElement. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:async_helper/async_helper.dart'; 7 import 'package:async_helper/async_helper.dart';
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 9
10 import 'package:compiler/src/elements/resolution_types.dart'; 10 import 'package:compiler/src/elements/resolution_types.dart';
11 import 'package:compiler/src/diagnostics/messages.dart'; 11 import 'package:compiler/src/diagnostics/messages.dart';
12 import 'package:compiler/src/elements/elements.dart'; 12 import 'package:compiler/src/elements/elements.dart';
13 import 'package:compiler/src/elements/modelx.dart' 13 import 'package:compiler/src/elements/modelx.dart'
14 show ClassElementX, CompilationUnitElementX, ElementX, FunctionElementX; 14 show ClassElementX, CompilationUnitElementX, ElementX;
15 import 'package:compiler/src/io/source_file.dart'; 15 import 'package:compiler/src/io/source_file.dart';
16 import 'package:compiler/src/resolution/tree_elements.dart' 16 import 'package:compiler/src/resolution/tree_elements.dart'
17 show TreeElements, TreeElementMapping; 17 show TreeElements, TreeElementMapping;
18 import 'package:compiler/src/parser/element_listener.dart'; 18 import 'package:compiler/src/parser/element_listener.dart';
19 import 'package:compiler/src/tree/tree.dart'; 19 import 'package:compiler/src/tree/tree.dart';
20 import 'package:compiler/src/typechecker.dart'; 20 import 'package:compiler/src/typechecker.dart';
21 import 'package:compiler/src/script.dart'; 21 import 'package:compiler/src/script.dart';
22 import 'package:compiler/src/util/util.dart'; 22 import 'package:compiler/src/util/util.dart';
23 23
24 import 'mock_compiler.dart'; 24 import 'mock_compiler.dart';
25 import 'options_helper.dart';
26 import 'parser_helper.dart'; 25 import 'parser_helper.dart';
27 26
28 final MessageKind NOT_ASSIGNABLE = MessageKind.NOT_ASSIGNABLE; 27 final MessageKind NOT_ASSIGNABLE = MessageKind.NOT_ASSIGNABLE;
29 final MessageKind UNDEFINED_GETTER = MessageKind.UNDEFINED_GETTER; 28 final MessageKind UNDEFINED_GETTER = MessageKind.UNDEFINED_GETTER;
30 29
31 main() { 30 main() {
32 List tests = [ 31 List tests = [
33 testSimpleTypes, 32 testSimpleTypes,
34 testReturn, 33 testReturn,
35 testFor, 34 testFor,
(...skipping 2754 matching lines...) Expand 10 before | Expand all | Expand 10 after
2790 TreeElements elements = compiler.resolveNodeStatement(node, element); 2789 TreeElements elements = compiler.resolveNodeStatement(node, element);
2791 TypeCheckerVisitor checker = 2790 TypeCheckerVisitor checker =
2792 new TypeCheckerVisitor(compiler, elements, compiler.types); 2791 new TypeCheckerVisitor(compiler, elements, compiler.types);
2793 DiagnosticCollector collector = compiler.diagnosticCollector; 2792 DiagnosticCollector collector = compiler.diagnosticCollector;
2794 collector.clear(); 2793 collector.clear();
2795 checker.analyze(node, mustHaveType: false); 2794 checker.analyze(node, mustHaveType: false);
2796 generateOutput(compiler, text); 2795 generateOutput(compiler, text);
2797 compareWarningKinds(text, warnings, collector.warnings); 2796 compareWarningKinds(text, warnings, collector.warnings);
2798 compareWarningKinds(text, hints, collector.hints); 2797 compareWarningKinds(text, hints, collector.hints);
2799 } 2798 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698