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.non_error_resolver_test; | 5 library engine.non_error_resolver_test; |
6 | 6 |
7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
9 import 'package:analyzer/src/generated/error.dart'; | 9 import 'package:analyzer/src/generated/error.dart'; |
10 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; | 10 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode; |
11 import 'package:analyzer/src/generated/source_io.dart'; | 11 import 'package:analyzer/src/generated/source_io.dart'; |
12 import 'package:unittest/unittest.dart' as _ut; | 12 import 'package:unittest/unittest.dart' as _ut; |
13 | 13 |
14 import '../reflective_tests.dart'; | 14 import '../reflective_tests.dart'; |
15 import 'resolver_test.dart'; | 15 import 'resolver_test.dart'; |
16 import 'test_support.dart'; | 16 import 'test_support.dart'; |
17 | 17 |
18 | 18 |
19 main() { | 19 main() { |
20 _ut.groupSep = ' | '; | 20 _ut.groupSep = ' | '; |
21 runReflectiveTests(NonErrorResolverTest); | 21 runReflectiveTests(NonErrorResolverTest); |
22 } | 22 } |
23 | 23 |
24 @ReflectiveTestCase() | 24 @reflectiveTest |
25 class NonErrorResolverTest extends ResolverTestCase { | 25 class NonErrorResolverTest extends ResolverTestCase { |
26 void fail_undefinedEnumConstant() { | 26 void fail_undefinedEnumConstant() { |
27 Source source = addSource(r''' | 27 Source source = addSource(r''' |
28 enum E { ONE } | 28 enum E { ONE } |
29 E e() { | 29 E e() { |
30 return E.TWO; | 30 return E.TWO; |
31 }'''); | 31 }'''); |
32 resolve(source); | 32 resolve(source); |
33 assertNoErrors(source); | 33 assertNoErrors(source); |
34 verify([source]); | 34 verify([source]); |
(...skipping 4761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4796 resolve(source); | 4796 resolve(source); |
4797 assertNoErrors(source); | 4797 assertNoErrors(source); |
4798 verify([source]); | 4798 verify([source]); |
4799 reset(); | 4799 reset(); |
4800 } | 4800 } |
4801 | 4801 |
4802 void _check_wrongNumberOfParametersForOperator1(String name) { | 4802 void _check_wrongNumberOfParametersForOperator1(String name) { |
4803 _check_wrongNumberOfParametersForOperator(name, "a"); | 4803 _check_wrongNumberOfParametersForOperator(name, "a"); |
4804 } | 4804 } |
4805 } | 4805 } |
OLD | NEW |