| 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 test.context.directory.manager; | 5 library test.context.directory.manager; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/context_manager.dart'; | 9 import 'package:analysis_server/src/context_manager.dart'; |
| 10 import 'package:analysis_server/src/utilities/null_string_sink.dart'; | 10 import 'package:analysis_server/src/utilities/null_string_sink.dart'; |
| (...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2081 [projPath, optionsFileName], | 2081 [projPath, optionsFileName], |
| 2082 r''' | 2082 r''' |
| 2083 ; | 2083 ; |
| 2084 '''); | 2084 '''); |
| 2085 // Setup context. | 2085 // Setup context. |
| 2086 manager.setRoots(<String>[projPath], <String>[], <String, String>{}); | 2086 manager.setRoots(<String>[projPath], <String>[], <String, String>{}); |
| 2087 | 2087 |
| 2088 // No error means success. | 2088 // No error means success. |
| 2089 } | 2089 } |
| 2090 | 2090 |
| 2091 test_deleteRoot_hasAnalysisOptions() async { |
| 2092 newFile([projPath, optionsFileName], ''); |
| 2093 |
| 2094 // Add the root. |
| 2095 manager.setRoots(<String>[projPath], <String>[], <String, String>{}); |
| 2096 await pumpEventQueue(); |
| 2097 |
| 2098 // Remove the root, with the analysis options file. |
| 2099 // No exceptions. |
| 2100 resourceProvider.deleteFolder(projPath); |
| 2101 await pumpEventQueue(); |
| 2102 } |
| 2103 |
| 2091 test_embedder_options() async { | 2104 test_embedder_options() async { |
| 2092 // Create files. | 2105 // Create files. |
| 2093 String libPath = newFolder([projPath, ContextManagerTest.LIB_NAME]); | 2106 String libPath = newFolder([projPath, ContextManagerTest.LIB_NAME]); |
| 2094 String sdkExtPath = newFolder([projPath, 'sdk_ext']); | 2107 String sdkExtPath = newFolder([projPath, 'sdk_ext']); |
| 2095 newFile([projPath, 'test', 'test.dart']); | 2108 newFile([projPath, 'test', 'test.dart']); |
| 2096 newFile([sdkExtPath, 'entry.dart']); | 2109 newFile([sdkExtPath, 'entry.dart']); |
| 2097 List<int> bytes = new SummaryBuilder([], null, true).build(); | 2110 List<int> bytes = new SummaryBuilder([], null, true).build(); |
| 2098 newFileFromBytes([projPath, 'sdk.ds'], bytes); | 2111 newFileFromBytes([projPath, 'sdk.ds'], bytes); |
| 2099 // Setup _embedder.yaml. | 2112 // Setup _embedder.yaml. |
| 2100 newFile( | 2113 newFile( |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2884 class TestUriResolver extends UriResolver { | 2897 class TestUriResolver extends UriResolver { |
| 2885 Map<Uri, Source> uriMap; | 2898 Map<Uri, Source> uriMap; |
| 2886 | 2899 |
| 2887 TestUriResolver(this.uriMap); | 2900 TestUriResolver(this.uriMap); |
| 2888 | 2901 |
| 2889 @override | 2902 @override |
| 2890 Source resolveAbsolute(Uri uri, [Uri actualUri]) { | 2903 Source resolveAbsolute(Uri uri, [Uri actualUri]) { |
| 2891 return uriMap[uri]; | 2904 return uriMap[uri]; |
| 2892 } | 2905 } |
| 2893 } | 2906 } |
| OLD | NEW |