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 library analyzer.test.generated.static_type_warning_code_test; | 5 library analyzer.test.generated.static_type_warning_code_test; |
6 | 6 |
7 import 'package:analyzer/src/generated/engine.dart'; | 7 import 'package:analyzer/src/generated/engine.dart'; |
8 import 'package:analyzer/src/generated/error.dart'; | 8 import 'package:analyzer/src/generated/error.dart'; |
9 import 'package:analyzer/src/generated/java_core.dart' show formatList; | 9 import 'package:analyzer/src/generated/java_core.dart' show formatList; |
10 import 'package:analyzer/src/generated/source_io.dart'; | 10 import 'package:analyzer/src/generated/source_io.dart'; |
11 import 'package:unittest/unittest.dart'; | 11 import 'package:unittest/unittest.dart'; |
12 | 12 |
13 import '../reflective_tests.dart'; | 13 import '../reflective_tests.dart'; |
14 import '../utils.dart'; | 14 import '../utils.dart'; |
15 import 'resolver_test.dart'; | 15 import 'resolver_test_case.dart'; |
16 | 16 |
17 main() { | 17 main() { |
18 initializeTestEnvironment(); | 18 initializeTestEnvironment(); |
19 runReflectiveTests(StaticTypeWarningCodeTest); | 19 runReflectiveTests(StaticTypeWarningCodeTest); |
20 runReflectiveTests(StrongModeStaticTypeWarningCodeTest); | 20 runReflectiveTests(StrongModeStaticTypeWarningCodeTest); |
21 } | 21 } |
22 | 22 |
23 @reflectiveTest | 23 @reflectiveTest |
24 class StaticTypeWarningCodeTest extends ResolverTestCase { | 24 class StaticTypeWarningCodeTest extends ResolverTestCase { |
25 void fail_inaccessibleSetter() { | 25 void fail_inaccessibleSetter() { |
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2263 for (AnalysisError error in analysisContext2.computeErrors(source)) { | 2263 for (AnalysisError error in analysisContext2.computeErrors(source)) { |
2264 if (error.errorCode == | 2264 if (error.errorCode == |
2265 StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS) { | 2265 StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS) { |
2266 expect(error.message, | 2266 expect(error.message, |
2267 formatList(error.errorCode.message, ['() → dynamic', 0, 1])); | 2267 formatList(error.errorCode.message, ['() → dynamic', 0, 1])); |
2268 } | 2268 } |
2269 } | 2269 } |
2270 verify([source]); | 2270 verify([source]); |
2271 } | 2271 } |
2272 } | 2272 } |
OLD | NEW |