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

Side by Side Diff: test/runner/tag_test.dart

Issue 1707173002: Add browser tags to all of our tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS 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 @TestOn("vm") 5 @TestOn("vm")
6 6
7 import 'package:scheduled_test/descriptor.dart' as d; 7 import 'package:scheduled_test/descriptor.dart' as d;
8 import 'package:scheduled_test/scheduled_stream.dart'; 8 import 'package:scheduled_test/scheduled_stream.dart';
9 import 'package:scheduled_test/scheduled_test.dart'; 9 import 'package:scheduled_test/scheduled_test.dart';
10 10
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 test("foo", () {}, tags: "a"); 248 test("foo", () {}, tags: "a");
249 } 249 }
250 """).create(); 250 """).create();
251 251
252 var test = runTest(["-p", "vm,content-shell", "test.dart"]); 252 var test = runTest(["-p", "vm,content-shell", "test.dart"]);
253 test.stdout.expect(consumeThrough(lines( 253 test.stdout.expect(consumeThrough(lines(
254 'Warning: A tag was used that wasn\'t specified in dart_test.yaml.\n' 254 'Warning: A tag was used that wasn\'t specified in dart_test.yaml.\n'
255 ' a was used in the test "foo"'))); 255 ' a was used in the test "foo"')));
256 test.stdout.expect(never(startsWith("Warning:"))); 256 test.stdout.expect(never(startsWith("Warning:")));
257 test.shouldExit(0); 257 test.shouldExit(0);
258 }); 258 }, tags: "content-shell");
259 }); 259 });
260 260
261 group("invalid tags", () { 261 group("invalid tags", () {
262 test("are disallowed by test()", () { 262 test("are disallowed by test()", () {
263 d.file("test.dart", """ 263 d.file("test.dart", """
264 import 'package:test/test.dart'; 264 import 'package:test/test.dart';
265 265
266 void main() { 266 void main() {
267 test("foo", () {}, tags: "a b"); 267 test("foo", () {}, tags: "a b");
268 } 268 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } 328 }
329 329
330 // Consume until the end of the warning block, and assert that it has no 330 // Consume until the end of the warning block, and assert that it has no
331 // further tags than the ones we specified. 331 // further tags than the ones we specified.
332 yield consumeWhile(isNot(anyOf([contains(" was used in"), isEmpty]))); 332 yield consumeWhile(isNot(anyOf([contains(" was used in"), isEmpty])));
333 yield isEmpty; 333 yield isEmpty;
334 }()); 334 }());
335 335
336 /// Returns a [StreamMatcher] that matches the lines of [string] in order. 336 /// Returns a [StreamMatcher] that matches the lines of [string] in order.
337 StreamMatcher lines(String string) => inOrder(string.split("\n")); 337 StreamMatcher lines(String string) => inOrder(string.split("\n"));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698