Index: pkg/analyzer/test/generated/all_the_rest_test.dart |
=================================================================== |
--- pkg/analyzer/test/generated/all_the_rest_test.dart (revision 43787) |
+++ pkg/analyzer/test/generated/all_the_rest_test.dart (working copy) |
@@ -47,6 +47,7 @@ |
runReflectiveTests(ConstantValueComputerTest); |
runReflectiveTests(ConstantVisitorTest); |
runReflectiveTests(ContentCacheTest); |
+ runReflectiveTests(CustomUriResolverTest); |
runReflectiveTests(DartObjectImplTest); |
runReflectiveTests(DartUriResolverTest); |
runReflectiveTests(DeclaredVariablesTest); |
@@ -7729,6 +7730,35 @@ |
@reflectiveTest |
+class CustomUriResolverTest { |
+ void test_creation() { |
+ expect(new CustomUriResolver({}), isNotNull); |
+ } |
+ |
+ void test_resolve_unknown_uri() { |
+ UriResolver resolver = new CustomUriResolver({ |
+ 'custom:library': '/path/to/library.dart', |
+ }); |
+ Source result = resolver.resolveAbsolute( |
+ parseUriWithException("custom:non_library")); |
+ expect(result, isNull); |
+ } |
+ |
+ void test_resolve_uri() { |
+ String path = |
+ FileUtilities2.createFile("/path/to/library.dart").getAbsolutePath(); |
+ UriResolver resolver = new CustomUriResolver({ |
+ 'custom:library': path, |
+ }); |
+ Source result = resolver.resolveAbsolute( |
+ parseUriWithException("custom:library")); |
+ expect(result, isNotNull); |
+ expect(result.fullName, path); |
+ } |
+} |
+ |
+ |
+@reflectiveTest |
class HtmlParserTest extends EngineTestCase { |
/** |
* The name of the 'script' tag in an HTML file. |