| 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 engine.compile_time_error_code_test; | 5 library engine.compile_time_error_code_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/error.dart'; | 7 import 'package:analyzer/src/generated/error.dart'; |
| 8 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; | 8 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; |
| 9 import 'package:analyzer/src/generated/source_io.dart'; | 9 import 'package:analyzer/src/generated/source_io.dart'; |
| 10 import 'package:unittest/unittest.dart' as _ut; | 10 import 'package:unittest/unittest.dart' as _ut; |
| 11 | 11 |
| 12 import '../reflective_tests.dart'; | 12 import '../reflective_tests.dart'; |
| 13 import 'resolver_test.dart'; | 13 import 'resolver_test.dart'; |
| 14 | 14 |
| 15 | 15 |
| 16 main() { | 16 main() { |
| 17 _ut.groupSep = ' | '; | 17 _ut.groupSep = ' | '; |
| 18 runReflectiveTests(CompileTimeErrorCodeTest); | 18 runReflectiveTests(CompileTimeErrorCodeTest); |
| 19 } | 19 } |
| 20 | 20 |
| 21 @ReflectiveTestCase() |
| 21 class CompileTimeErrorCodeTest extends ResolverTestCase { | 22 class CompileTimeErrorCodeTest extends ResolverTestCase { |
| 22 void fail_compileTimeConstantRaisesException() { | 23 void fail_compileTimeConstantRaisesException() { |
| 23 Source source = addSource(r''' | 24 Source source = addSource(r''' |
| 24 '''); | 25 '''); |
| 25 resolve(source); | 26 resolve(source); |
| 26 assertErrors( | 27 assertErrors( |
| 27 source, | 28 source, |
| 28 [CompileTimeErrorCode.COMPILE_TIME_CONSTANT_RAISES_EXCEPTION]); | 29 [CompileTimeErrorCode.COMPILE_TIME_CONSTANT_RAISES_EXCEPTION]); |
| 29 verify([source]); | 30 verify([source]); |
| 30 } | 31 } |
| (...skipping 5437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5468 [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]); | 5469 [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]); |
| 5469 verify([source]); | 5470 verify([source]); |
| 5470 reset(); | 5471 reset(); |
| 5471 } | 5472 } |
| 5472 | 5473 |
| 5473 void _check_wrongNumberOfParametersForOperator1(String name) { | 5474 void _check_wrongNumberOfParametersForOperator1(String name) { |
| 5474 _check_wrongNumberOfParametersForOperator(name, ""); | 5475 _check_wrongNumberOfParametersForOperator(name, ""); |
| 5475 _check_wrongNumberOfParametersForOperator(name, "a, b"); | 5476 _check_wrongNumberOfParametersForOperator(name, "a, b"); |
| 5476 } | 5477 } |
| 5477 } | 5478 } |
| OLD | NEW |