| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 import 'package:async_helper/async_helper.dart'; | 6 import 'package:async_helper/async_helper.dart'; |
| 7 import 'compiler_helper.dart'; | 7 import 'compiler_helper.dart'; |
| 8 import 'package:compiler/src/resolution/class_members.dart' | 8 import 'package:compiler/src/resolution/class_members.dart' |
| 9 show MembersCreator; | 9 show MembersCreator; |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 testAbstractMethods(), | 22 testAbstractMethods(), |
| 23 testNoSuchMethod(), | 23 testNoSuchMethod(), |
| 24 ])); | 24 ])); |
| 25 } | 25 } |
| 26 | 26 |
| 27 Future check(String source, {errors, warnings, hints, infos}) { | 27 Future check(String source, {errors, warnings, hints, infos}) { |
| 28 return MockCompiler.create((MockCompiler compiler) { | 28 return MockCompiler.create((MockCompiler compiler) { |
| 29 compiler.diagnosticHandler = createHandler(compiler, source); | 29 compiler.diagnosticHandler = createHandler(compiler, source); |
| 30 compiler.parseScript(source); | 30 compiler.parseScript(source); |
| 31 var cls = compiler.mainApp.find('Class'); | 31 var cls = compiler.mainApp.find('Class'); |
| 32 cls.ensureResolved(compiler); | 32 cls.ensureResolved(compiler.resolution); |
| 33 MembersCreator.computeAllClassMembers(compiler, cls); | 33 MembersCreator.computeAllClassMembers(compiler, cls); |
| 34 | 34 |
| 35 toList(o) => o == null ? [] : o is List ? o : [o]; | 35 toList(o) => o == null ? [] : o is List ? o : [o]; |
| 36 | 36 |
| 37 compareMessageKinds(source, toList(errors), compiler.errors, 'error'); | 37 compareMessageKinds(source, toList(errors), compiler.errors, 'error'); |
| 38 | 38 |
| 39 compareMessageKinds(source, toList(warnings), compiler.warnings, 'warning'); | 39 compareMessageKinds(source, toList(warnings), compiler.warnings, 'warning'); |
| 40 | 40 |
| 41 if (infos != null) { | 41 if (infos != null) { |
| 42 compareMessageKinds(source, toList(infos), compiler.infos, 'info'); | 42 compareMessageKinds(source, toList(infos), compiler.infos, 'info'); |
| (...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1537 class A { | 1537 class A { |
| 1538 noSuchMethod(_) => null; | 1538 noSuchMethod(_) => null; |
| 1539 method(); // testNoSuchMethod:13 | 1539 method(); // testNoSuchMethod:13 |
| 1540 } | 1540 } |
| 1541 class Class extends A { | 1541 class Class extends A { |
| 1542 } | 1542 } |
| 1543 """, warnings: MessageKind.UNIMPLEMENTED_METHOD_ONE, | 1543 """, warnings: MessageKind.UNIMPLEMENTED_METHOD_ONE, |
| 1544 infos: MessageKind.UNIMPLEMENTED_METHOD_CONT), | 1544 infos: MessageKind.UNIMPLEMENTED_METHOD_CONT), |
| 1545 ]); | 1545 ]); |
| 1546 } | 1546 } |
| OLD | NEW |