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

Unified Diff: pkg/barback/test/transformer_test.dart

Issue 243793005: Don't require Transformer methods to return Futures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review 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/barback/test/transformer/sync_rewrite.dart ('k') | pkg/barback/test/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/test/transformer_test.dart
diff --git a/pkg/barback/test/transformer_test.dart b/pkg/barback/test/transformer_test.dart
index 3eb83a16dab0b9e2fd97d1b64e10494dfd3352e0..5ff96c8253879480b6ca53aca41187e4fcbaccee 100644
--- a/pkg/barback/test/transformer_test.dart
+++ b/pkg/barback/test/transformer_test.dart
@@ -7,6 +7,7 @@ library barback.test.transformer_test;
import 'dart:async';
import 'package:barback/barback.dart';
+import 'package:barback/src/utils.dart';
import 'package:unittest/unittest.dart';
import 'utils.dart';
@@ -17,25 +18,20 @@ main() {
group("isPrimary", () {
test("defaults to allowedExtensions", () {
var transformer = new ExtensionTransformer(".txt .bin");
- expect(transformer.isPrimary(new AssetId("pkg", "foo.txt")),
- completion(isTrue));
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.txt")), isTrue);
- expect(transformer.isPrimary(new AssetId("pkg", "foo.bin")),
- completion(isTrue));
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.bin")), isTrue);
- expect(transformer.isPrimary(new AssetId("pkg", "foo.nottxt")),
- completion(isFalse));
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.nottxt")), isFalse);
});
test("supports multi-level extensions with allowedExtensions", () {
var transformer = new ExtensionTransformer(".dart.js");
- expect(transformer.isPrimary(new AssetId("pkg", "foo.dart.js")),
- completion(isTrue));
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.dart.js")), isTrue);
- expect(transformer.isPrimary(new AssetId("pkg", "foo.js")),
- completion(isFalse));
- expect(transformer.isPrimary(new AssetId("pkg", "foo.dart")),
- completion(isFalse));
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.js")), isFalse);
+
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.dart")), isFalse);
});
test("throws an error for extensions without periods", () {
@@ -44,14 +40,11 @@ main() {
test("allows all files if allowedExtensions is not overridden", () {
var transformer = new MockTransformer();
- expect(transformer.isPrimary(new AssetId("pkg", "foo.txt")),
- completion(isTrue));
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.txt")), isTrue);
- expect(transformer.isPrimary(new AssetId("pkg", "foo.bin")),
- completion(isTrue));
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.bin")), isTrue);
- expect(transformer.isPrimary(new AssetId("pkg", "anything")),
- completion(isTrue));
+ expect(transformer.isPrimary(new AssetId("pkg", "anything")), isTrue);
});
});
}
« no previous file with comments | « pkg/barback/test/transformer/sync_rewrite.dart ('k') | pkg/barback/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698