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.compile_time_error_code_test; | 5 library analyzer.test.generated.compile_time_error_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/parser.dart' show ParserErrorCode; | 9 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; |
10 import 'package:analyzer/src/generated/source_io.dart'; | 10 import 'package:analyzer/src/generated/source_io.dart'; |
11 import 'package:unittest/unittest.dart' show expect; | 11 import 'package:unittest/unittest.dart' show expect; |
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(CompileTimeErrorCodeTest); | 19 runReflectiveTests(CompileTimeErrorCodeTest); |
20 } | 20 } |
21 | 21 |
22 @reflectiveTest | 22 @reflectiveTest |
23 class CompileTimeErrorCodeTest extends ResolverTestCase { | 23 class CompileTimeErrorCodeTest extends ResolverTestCase { |
24 void fail_awaitInWrongContext_sync() { | 24 void fail_awaitInWrongContext_sync() { |
25 // This test requires better error recovery than we currently have. In | 25 // This test requires better error recovery than we currently have. In |
(...skipping 6295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6321 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]); | 6321 source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]); |
6322 verify([source]); | 6322 verify([source]); |
6323 reset(); | 6323 reset(); |
6324 } | 6324 } |
6325 | 6325 |
6326 void _check_wrongNumberOfParametersForOperator1(String name) { | 6326 void _check_wrongNumberOfParametersForOperator1(String name) { |
6327 _check_wrongNumberOfParametersForOperator(name, ""); | 6327 _check_wrongNumberOfParametersForOperator(name, ""); |
6328 _check_wrongNumberOfParametersForOperator(name, "a, b"); | 6328 _check_wrongNumberOfParametersForOperator(name, "a, b"); |
6329 } | 6329 } |
6330 } | 6330 } |
OLD | NEW |