Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(874)

Unified Diff: pkg/analyzer/test/generated/all_the_rest_test.dart

Issue 897593005: Adds a repeatable --url_mapping flag to dartanalyzer (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/source.dart ('k') | pkg/analyzer/test/options_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « pkg/analyzer/lib/src/generated/source.dart ('k') | pkg/analyzer/test/options_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698