Index: pkg/analyzer/test/src/context/builder_test.dart |
diff --git a/pkg/analyzer/test/src/context/builder_test.dart b/pkg/analyzer/test/src/context/builder_test.dart |
index 1f94afa79e13c8e6c58993f1292f0c06196ef2b3..e6ed76f96d33d5bfff63525d72ebf6e90d053c30 100644 |
--- a/pkg/analyzer/test/src/context/builder_test.dart |
+++ b/pkg/analyzer/test/src/context/builder_test.dart |
@@ -22,6 +22,7 @@ import 'package:unittest/unittest.dart'; |
import '../../generated/test_support.dart'; |
import '../../reflective_tests.dart'; |
+import '../../source/embedder_test.dart'; |
import '../../utils.dart'; |
import 'mock_sdk.dart'; |
@@ -29,6 +30,7 @@ main() { |
initializeTestEnvironment(); |
runReflectiveTests(ContextBuilderTest_WithDisk); |
runReflectiveTests(ContextBuilderTest_WithoutDisk); |
+ runReflectiveTests(EmbedderYamlLocatorTest); |
} |
@reflectiveTest |
@@ -695,3 +697,26 @@ analyzer: |
expect(actual.finerGrainedInvalidation, expected.finerGrainedInvalidation); |
} |
} |
+ |
+@reflectiveTest |
+class EmbedderYamlLocatorTest extends EmbedderRelatedTest { |
+ void test_empty() { |
+ EmbedderYamlLocator locator = new EmbedderYamlLocator({ |
+ 'fox': [pathTranslator.getResource('/empty')] |
+ }); |
+ expect(locator.embedderYamls, hasLength(0)); |
+ } |
+ |
+ void test_invalid() { |
+ EmbedderYamlLocator locator = new EmbedderYamlLocator(null); |
+ locator.addEmbedderYaml(null, r'''{{{,{{}}},}}'''); |
+ expect(locator.embedderYamls, hasLength(0)); |
+ } |
+ |
+ void test_valid() { |
+ EmbedderYamlLocator locator = new EmbedderYamlLocator({ |
+ 'fox': [pathTranslator.getResource('/tmp')] |
+ }); |
+ expect(locator.embedderYamls, hasLength(1)); |
+ } |
+} |