| 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/source_io.dart'; | 7 import 'package:analyzer/src/generated/source_io.dart'; |
| 8 import 'package:analyzer/src/generated/error.dart'; | 8 import 'package:analyzer/src/generated/error.dart'; |
| 9 import 'package:analyzer/src/generated/ast.dart'; | 9 import 'package:analyzer/src/generated/ast.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/element.dart'; | 11 import 'package:analyzer/src/generated/element.dart'; |
| 12 import 'package:analyzer/src/generated/engine.dart'; | 12 import 'package:analyzer/src/generated/engine.dart'; |
| 13 import 'package:unittest/unittest.dart' as _ut; | 13 import 'package:unittest/unittest.dart' as _ut; |
| 14 import 'resolver_test.dart'; | 14 import 'resolver_test.dart'; |
| 15 import 'test_support.dart'; | 15 import 'test_support.dart'; |
| 16 import '../reflective_tests.dart'; | 16 import '../reflective_tests.dart'; |
| 17 | 17 |
| 18 | 18 |
| 19 class NonErrorResolverTest extends ResolverTestCase { | 19 class NonErrorResolverTest extends ResolverTestCase { |
| 20 void fail_undefinedEnumConstant() { | 20 void fail_undefinedEnumConstant() { |
| 21 Source source = addSource(EngineTestCase.createSource(["enum E { ONE }", "E
e() {", " return E.ONE;", "}"])); | 21 Source source = addSource(EngineTestCase.createSource(["enum E { ONE }", "E
e() {", " return E.TWO;", "}"])); |
| 22 resolve(source); | 22 resolve(source); |
| 23 assertNoErrors(source); | 23 assertNoErrors(source); |
| 24 verify([source]); | 24 verify([source]); |
| 25 } | 25 } |
| 26 | 26 |
| 27 void test_ambiguousExport() { | 27 void test_ambiguousExport() { |
| 28 Source source = addSource(EngineTestCase.createSource([ | 28 Source source = addSource(EngineTestCase.createSource([ |
| 29 "library L;", | 29 "library L;", |
| 30 "export 'lib1.dart';", | 30 "export 'lib1.dart';", |
| 31 "export 'lib2.dart';"])); | 31 "export 'lib2.dart';"])); |
| (...skipping 4228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4260 | 4260 |
| 4261 void _check_wrongNumberOfParametersForOperator1(String name) { | 4261 void _check_wrongNumberOfParametersForOperator1(String name) { |
| 4262 _check_wrongNumberOfParametersForOperator(name, "a"); | 4262 _check_wrongNumberOfParametersForOperator(name, "a"); |
| 4263 } | 4263 } |
| 4264 } | 4264 } |
| 4265 | 4265 |
| 4266 main() { | 4266 main() { |
| 4267 _ut.groupSep = ' | '; | 4267 _ut.groupSep = ' | '; |
| 4268 runReflectiveTests(NonErrorResolverTest); | 4268 runReflectiveTests(NonErrorResolverTest); |
| 4269 } | 4269 } |
| OLD | NEW |