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

Unified Diff: sdk/lib/_internal/pub/test/transformer/can_use_consume_primary_test.dart

Issue 198053009: Use real "package:" imports in pub's plugin-loading code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 9 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: sdk/lib/_internal/pub/test/transformer/can_use_consume_primary_test.dart
diff --git a/sdk/lib/_internal/pub/test/transformer/can_use_read_input_test.dart b/sdk/lib/_internal/pub/test/transformer/can_use_consume_primary_test.dart
similarity index 78%
copy from sdk/lib/_internal/pub/test/transformer/can_use_read_input_test.dart
copy to sdk/lib/_internal/pub/test/transformer/can_use_consume_primary_test.dart
index fba1eed718ec25ea170930a19ddaa6b9f38e3393..9b41b2bbc5905412e31e2c3d02224973d5b1ff64 100644
--- a/sdk/lib/_internal/pub/test/transformer/can_use_read_input_test.dart
+++ b/sdk/lib/_internal/pub/test/transformer/can_use_consume_primary_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -19,8 +19,8 @@ class RewriteTransformer extends Transformer {
String get allowedExtensions => '.txt';
Future apply(Transform transform) {
- return transform.readInput(transform.primaryInput.id).toList()
- .then((contents) {
+ transform.consumePrimary();
+ return transform.primaryInput.readAsString().then((contents) {
var id = transform.primaryInput.id.changeExtension(".out");
var asset = new Asset.fromString(id, "\$contents.out");
transform.addOutput(asset);
@@ -31,7 +31,7 @@ class RewriteTransformer extends Transformer {
main() {
initConfig();
- integration("a transform can use readInputAsString", () {
+ integration("a transform can use consumePrimary", () {
d.dir(appPath, [
d.pubspec({
"name": "myapp",
@@ -48,7 +48,8 @@ main() {
createLockFile('myapp', pkg: ['barback']);
pubServe();
- requestShouldSucceed("foo.out", "[[102, 111, 111]].out");
+ requestShouldSucceed("foo.out", "foo.out");
+ requestShould404("foo.txt");
endPubServe();
});
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/io.dart ('k') | sdk/lib/_internal/pub/test/transformer/can_use_has_input_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698