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

Side by Side Diff: test/transformer/can_log_messages_test.dart

Issue 1215833002: Use the new test runner. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pub_tests; 5 library pub_tests;
6 6
7 import 'package:pub/src/exit_codes.dart' as exit_codes; 7 import 'package:pub/src/exit_codes.dart' as exit_codes;
8 import 'package:scheduled_test/scheduled_test.dart'; 8 import 'package:scheduled_test/scheduled_test.dart';
9 import 'package:scheduled_test/scheduled_stream.dart'; 9 import 'package:scheduled_test/scheduled_stream.dart';
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 transform.logger.error('ERROR!', span: sourceFile.span(11, 12)); 58 transform.logger.error('ERROR!', span: sourceFile.span(11, 12));
59 return transform.primaryInput.readAsString().then((contents) { 59 return transform.primaryInput.readAsString().then((contents) {
60 var id = transform.primaryInput.id.changeExtension(".out"); 60 var id = transform.primaryInput.id.changeExtension(".out");
61 transform.addOutput(new Asset.fromString(id, "\$contents.out")); 61 transform.addOutput(new Asset.fromString(id, "\$contents.out"));
62 }); 62 });
63 } 63 }
64 } 64 }
65 """; 65 """;
66 66
67 main() { 67 main() {
68 initConfig();
69 // This intentionally tests barback 0.14.2 with both transformers, since it 68 // This intentionally tests barback 0.14.2 with both transformers, since it
70 // supports both types of span. 69 // supports both types of span.
71 withBarbackVersions("<0.15.0", () => runTest(SOURCE_MAPS_TRANSFORMER)); 70 withBarbackVersions("<0.15.0", () => runTest(SOURCE_MAPS_TRANSFORMER));
72 withBarbackVersions(">=0.14.2", () => runTest(SOURCE_SPAN_TRANSFORMER)); 71 withBarbackVersions(">=0.14.2", () => runTest(SOURCE_SPAN_TRANSFORMER));
73 } 72 }
74 73
75 void runTest(String transformerText) { 74 void runTest(String transformerText) {
76 integration("can log messages", () { 75 integration("can log messages", () {
77 d.dir(appPath, [ 76 d.dir(appPath, [
78 d.pubspec({ 77 d.pubspec({
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 114
116 // In barback >=0.15.0, the span will point to the location where the error 115 // In barback >=0.15.0, the span will point to the location where the error
117 // occurred. 116 // occurred.
118 pub.stderr.expect(allow(inOrder(["d", "^"]))); 117 pub.stderr.expect(allow(inOrder(["d", "^"])));
119 118
120 pub.stderr.expect("Build failed."); 119 pub.stderr.expect("Build failed.");
121 120
122 pub.shouldExit(exit_codes.DATA); 121 pub.shouldExit(exit_codes.DATA);
123 }); 122 });
124 } 123 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698