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

Unified Diff: pkg/code_transformers/test/resolver_test.dart

Issue 223553008: Only pass an AssetId to isPrimary and declareOutputs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix script_compactor Created 6 years, 8 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/code_transformers/test/entry_point_test.dart ('k') | pkg/observe/lib/transformer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/code_transformers/test/resolver_test.dart
diff --git a/pkg/code_transformers/test/resolver_test.dart b/pkg/code_transformers/test/resolver_test.dart
index c9bcc6ebe59e66674bb9ad89c304245546876885..1403b1f666246431449941480a74f9174b68e90a 100644
--- a/pkg/code_transformers/test/resolver_test.dart
+++ b/pkg/code_transformers/test/resolver_test.dart
@@ -354,8 +354,12 @@ class TestTransformer extends Transformer with ResolverTransformer {
this.resolvers = resolvers;
}
- Future<bool> isPrimary(Asset input) =>
- new Future.value(input.id == primary);
+ // TODO(nweiz): This should just take an AssetId when barback <0.13.0 support
+ // is dropped.
+ Future<bool> isPrimary(idOrAsset) {
+ var id = idOrAsset is AssetId ? idOrAsset : idOrAsset.id;
+ return new Future.value(id == primary);
+ }
applyResolver(Transform transform, Resolver resolver) => validator(resolver);
}
« no previous file with comments | « pkg/code_transformers/test/entry_point_test.dart ('k') | pkg/observe/lib/transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698