| 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.resolver_test; | 5 library engine.resolver_test; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'package:analyzer/src/generated/java_core.dart'; | 8 import 'package:analyzer/src/generated/java_core.dart'; |
| 9 import 'package:analyzer/src/generated/java_junit.dart'; | 9 import 'package:analyzer/src/generated/java_junit.dart'; |
| 10 import 'package:analyzer/src/generated/java_engine.dart'; | 10 import 'package:analyzer/src/generated/java_engine.dart'; |
| (...skipping 6388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6399 CompilationUnit resolveSource(String sourceText) => resolveSource2("/test.dart
", sourceText); | 6399 CompilationUnit resolveSource(String sourceText) => resolveSource2("/test.dart
", sourceText); |
| 6400 | 6400 |
| 6401 CompilationUnit resolveSource2(String fileName, String sourceText) { | 6401 CompilationUnit resolveSource2(String fileName, String sourceText) { |
| 6402 Source source = addNamedSource(fileName, sourceText); | 6402 Source source = addNamedSource(fileName, sourceText); |
| 6403 LibraryElement library = analysisContext.computeLibraryElement(source); | 6403 LibraryElement library = analysisContext.computeLibraryElement(source); |
| 6404 return analysisContext.resolveCompilationUnit(source, library); | 6404 return analysisContext.resolveCompilationUnit(source, library); |
| 6405 } | 6405 } |
| 6406 | 6406 |
| 6407 Source resolveSources(List<String> sourceTexts) { | 6407 Source resolveSources(List<String> sourceTexts) { |
| 6408 for (int i = 0; i < sourceTexts.length; i++) { | 6408 for (int i = 0; i < sourceTexts.length; i++) { |
| 6409 CompilationUnit unit = resolveSource2("/lib${(i + 1)}.dart", sourceTexts[i
]); | 6409 CompilationUnit unit = resolveSource2("/lib${i + 1}.dart", sourceTexts[i])
; |
| 6410 // reference the source if this is the last source | 6410 // reference the source if this is the last source |
| 6411 if (i + 1 == sourceTexts.length) { | 6411 if (i + 1 == sourceTexts.length) { |
| 6412 return unit.element.source; | 6412 return unit.element.source; |
| 6413 } | 6413 } |
| 6414 } | 6414 } |
| 6415 return null; | 6415 return null; |
| 6416 } | 6416 } |
| 6417 | 6417 |
| 6418 void resolveWithAndWithoutExperimental(List<String> strSources, List<ErrorCode
> codesWithoutExperimental, List<ErrorCode> codesWithExperimental) { | 6418 void resolveWithAndWithoutExperimental(List<String> strSources, List<ErrorCode
> codesWithoutExperimental, List<ErrorCode> codesWithExperimental) { |
| 6419 // Setup analysis context as non-experimental | 6419 // Setup analysis context as non-experimental |
| (...skipping 5072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11492 runReflectiveTests(TypeResolverVisitorTest); | 11492 runReflectiveTests(TypeResolverVisitorTest); |
| 11493 runReflectiveTests(CheckedModeCompileTimeErrorCodeTest); | 11493 runReflectiveTests(CheckedModeCompileTimeErrorCodeTest); |
| 11494 runReflectiveTests(ErrorResolverTest); | 11494 runReflectiveTests(ErrorResolverTest); |
| 11495 runReflectiveTests(HintCodeTest); | 11495 runReflectiveTests(HintCodeTest); |
| 11496 runReflectiveTests(MemberMapTest); | 11496 runReflectiveTests(MemberMapTest); |
| 11497 runReflectiveTests(NonHintCodeTest); | 11497 runReflectiveTests(NonHintCodeTest); |
| 11498 runReflectiveTests(SimpleResolverTest); | 11498 runReflectiveTests(SimpleResolverTest); |
| 11499 runReflectiveTests(StrictModeTest); | 11499 runReflectiveTests(StrictModeTest); |
| 11500 runReflectiveTests(TypePropagationTest); | 11500 runReflectiveTests(TypePropagationTest); |
| 11501 } | 11501 } |
| OLD | NEW |