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

Unified Diff: third_party/pkg/barback-0.13.0/test/transformer_test.dart

Issue 291843011: Run pub tests against older versions of barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 7 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
Index: third_party/pkg/barback-0.13.0/test/transformer_test.dart
diff --git a/pkg/barback/test/transformer_test.dart b/third_party/pkg/barback-0.13.0/test/transformer_test.dart
similarity index 85%
copy from pkg/barback/test/transformer_test.dart
copy to third_party/pkg/barback-0.13.0/test/transformer_test.dart
index 5ff96c8253879480b6ca53aca41187e4fcbaccee..3eb83a16dab0b9e2fd97d1b64e10494dfd3352e0 100644
--- a/pkg/barback/test/transformer_test.dart
+++ b/third_party/pkg/barback-0.13.0/test/transformer_test.dart
@@ -7,7 +7,6 @@ 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';
@@ -18,20 +17,25 @@ main() {
group("isPrimary", () {
test("defaults to allowedExtensions", () {
var transformer = new ExtensionTransformer(".txt .bin");
- expect(transformer.isPrimary(new AssetId("pkg", "foo.txt")), isTrue);
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.txt")),
+ completion(isTrue));
- expect(transformer.isPrimary(new AssetId("pkg", "foo.bin")), isTrue);
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.bin")),
+ completion(isTrue));
- expect(transformer.isPrimary(new AssetId("pkg", "foo.nottxt")), isFalse);
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.nottxt")),
+ completion(isFalse));
});
test("supports multi-level extensions with allowedExtensions", () {
var transformer = new ExtensionTransformer(".dart.js");
- expect(transformer.isPrimary(new AssetId("pkg", "foo.dart.js")), isTrue);
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.dart.js")),
+ completion(isTrue));
- expect(transformer.isPrimary(new AssetId("pkg", "foo.js")), isFalse);
-
- expect(transformer.isPrimary(new AssetId("pkg", "foo.dart")), isFalse);
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.js")),
+ completion(isFalse));
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.dart")),
+ completion(isFalse));
});
test("throws an error for extensions without periods", () {
@@ -40,11 +44,14 @@ main() {
test("allows all files if allowedExtensions is not overridden", () {
var transformer = new MockTransformer();
- expect(transformer.isPrimary(new AssetId("pkg", "foo.txt")), isTrue);
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.txt")),
+ completion(isTrue));
- expect(transformer.isPrimary(new AssetId("pkg", "foo.bin")), isTrue);
+ expect(transformer.isPrimary(new AssetId("pkg", "foo.bin")),
+ completion(isTrue));
- expect(transformer.isPrimary(new AssetId("pkg", "anything")), isTrue);
+ expect(transformer.isPrimary(new AssetId("pkg", "anything")),
+ completion(isTrue));
});
});
}
« no previous file with comments | « third_party/pkg/barback-0.13.0/test/transformer/rewrite.dart ('k') | third_party/pkg/barback-0.13.0/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698