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

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

Issue 180473003: Barback transforms now pass through the primary input by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code reivew Created 6 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/barback/test/package_graph/transform_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/test/utils.dart
diff --git a/pkg/barback/test/utils.dart b/pkg/barback/test/utils.dart
index 7da5977e9b7a80561ea521a74f841a8b21f23ad5..4c39848c1b9cc80c22fc05baba1999ec43f50b95 100644
--- a/pkg/barback/test/utils.dart
+++ b/pkg/barback/test/utils.dart
@@ -249,9 +249,10 @@ Future<LogEntry> _getNextLog(String description) {
/// Schedules an expectation that the graph will deliver an asset matching
/// [name] and [contents].
///
-/// If [contents] is omitted, defaults to the asset's filename without an
-/// extension (which is the same default that [initGraph] uses).
-void expectAsset(String name, [String contents]) {
+/// [contents] may be a [String] or a [Matcher] that matches a string. If
+/// [contents] is omitted, defaults to the asset's filename without an extension
+/// (which is the same default that [initGraph] uses).
+void expectAsset(String name, [contents]) {
var id = new AssetId.parse(name);
if (contents == null) {
@@ -262,7 +263,7 @@ void expectAsset(String name, [String contents]) {
return _barback.getAssetById(id).then((asset) {
// TODO(rnystrom): Make an actual Matcher class for this.
expect(asset.id, equals(id));
- expect(asset.readAsString(), completion(equals(contents)));
+ expect(asset.readAsString(), completion(contents));
});
}, "get asset $name");
}
« no previous file with comments | « pkg/barback/test/package_graph/transform_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698