| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.engine_test; | 8 library engine.engine_test; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 export 'libB.dart';'''); | 874 export 'libB.dart';'''); |
| 875 Source lib2Source = _addSource( | 875 Source lib2Source = _addSource( |
| 876 "/lib2.dart", | 876 "/lib2.dart", |
| 877 r''' | 877 r''' |
| 878 library lib2; | 878 library lib2; |
| 879 import 'libB.dart'; | 879 import 'libB.dart'; |
| 880 export 'libA.dart';'''); | 880 export 'libA.dart';'''); |
| 881 _context.computeLibraryElement(lib1Source); | 881 _context.computeLibraryElement(lib1Source); |
| 882 _context.computeLibraryElement(lib2Source); | 882 _context.computeLibraryElement(lib2Source); |
| 883 List<Source> result = _context.getLibrariesDependingOn(libASource); | 883 List<Source> result = _context.getLibrariesDependingOn(libASource); |
| 884 EngineTestCase.assertContains(result, [lib1Source, lib2Source]); | 884 expect(result, unorderedEquals([lib1Source, lib2Source])); |
| 885 } | 885 } |
| 886 | 886 |
| 887 void test_getLibrariesReferencedFromHtml() { | 887 void test_getLibrariesReferencedFromHtml() { |
| 888 _context = AnalysisContextFactory.contextWithCore(); | 888 _context = AnalysisContextFactory.contextWithCore(); |
| 889 _sourceFactory = _context.sourceFactory; | 889 _sourceFactory = _context.sourceFactory; |
| 890 Source htmlSource = _addSource( | 890 Source htmlSource = _addSource( |
| 891 "/test.html", | 891 "/test.html", |
| 892 r''' | 892 r''' |
| 893 <html><head> | 893 <html><head> |
| 894 <script type='application/dart' src='test.dart'/> | 894 <script type='application/dart' src='test.dart'/> |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 _analyzeAll_assertFinished(); | 1203 _analyzeAll_assertFinished(); |
| 1204 // add part and run all tasks | 1204 // add part and run all tasks |
| 1205 Source partSource = | 1205 Source partSource = |
| 1206 _addSource("/part.dart", r''' | 1206 _addSource("/part.dart", r''' |
| 1207 part of lib; | 1207 part of lib; |
| 1208 '''); | 1208 '''); |
| 1209 _analyzeAll_assertFinished(); | 1209 _analyzeAll_assertFinished(); |
| 1210 // "libSource" should be here | 1210 // "libSource" should be here |
| 1211 List<Source> librariesWithPart = | 1211 List<Source> librariesWithPart = |
| 1212 _context.getLibrariesContaining(partSource); | 1212 _context.getLibrariesContaining(partSource); |
| 1213 EngineTestCase.assertContains(librariesWithPart, [libSource]); | 1213 expect(librariesWithPart, unorderedEquals([libSource])); |
| 1214 } | 1214 } |
| 1215 | 1215 |
| 1216 void test_performAnalysisTask_changeLibraryContents() { | 1216 void test_performAnalysisTask_changeLibraryContents() { |
| 1217 Source libSource = | 1217 Source libSource = |
| 1218 _addSource("/test.dart", "library lib; part 'test-part.dart';"); | 1218 _addSource("/test.dart", "library lib; part 'test-part.dart';"); |
| 1219 Source partSource = _addSource("/test-part.dart", "part of lib;"); | 1219 Source partSource = _addSource("/test-part.dart", "part of lib;"); |
| 1220 _analyzeAll_assertFinished(); | 1220 _analyzeAll_assertFinished(); |
| 1221 expect(_context.getResolvedCompilationUnit2(libSource, libSource), isNotNull
, reason: "library resolved 1"); | 1221 expect(_context.getResolvedCompilationUnit2(libSource, libSource), isNotNull
, reason: "library resolved 1"); |
| 1222 expect(_context.getResolvedCompilationUnit2(partSource, libSource), isNotNul
l, reason: "part resolved 1"); | 1222 expect(_context.getResolvedCompilationUnit2(partSource, libSource), isNotNul
l, reason: "part resolved 1"); |
| 1223 // update and analyze #1 | 1223 // update and analyze #1 |
| (...skipping 5272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6496 } | 6496 } |
| 6497 } | 6497 } |
| 6498 | 6498 |
| 6499 | 6499 |
| 6500 class _UniversalCachePartitionTest_test_setMaxCacheSize implements | 6500 class _UniversalCachePartitionTest_test_setMaxCacheSize implements |
| 6501 CacheRetentionPolicy { | 6501 CacheRetentionPolicy { |
| 6502 @override | 6502 @override |
| 6503 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) => | 6503 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) => |
| 6504 RetentionPriority.LOW; | 6504 RetentionPriority.LOW; |
| 6505 } | 6505 } |
| OLD | NEW |