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

Side by Side Diff: test/runner/configuration/top_level_test.dart

Issue 2099553002: Add an option to run skipped tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 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
« no previous file with comments | « test/runner/configuration/configuration_test.dart ('k') | test/runner/engine_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:path/path.dart' as p; 10 import 'package:path/path.dart' as p;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // our input. 72 // our input.
73 await new Future.delayed(new Duration(seconds: 2)); 73 await new Future.delayed(new Duration(seconds: 2));
74 expect(nextLineFired, isFalse); 74 expect(nextLineFired, isFalse);
75 }); 75 });
76 76
77 test.writeLine(''); 77 test.writeLine('');
78 test.stdout.expect(consumeThrough(contains("+1: All tests passed!"))); 78 test.stdout.expect(consumeThrough(contains("+1: All tests passed!")));
79 test.shouldExit(0); 79 test.shouldExit(0);
80 }, tags: 'content-shell'); 80 }, tags: 'content-shell');
81 81
82 test("runs skipped tests with run_skipped: true", () {
83 d.file("dart_test.yaml", JSON.encode({
84 "run_skipped": true
85 })).create();
86
87 d.file("test.dart", """
88 import 'package:test/test.dart';
89
90 void main() {
91 test("skip", () => print("In test!"), skip: true);
92 }
93 """).create();
94
95 var test = runTest(["test.dart"]);
96 test.stdout.expect(consumeThrough(contains("In test!")));
97 test.stdout.expect(consumeThrough(contains("+1: All tests passed!")));
98 test.shouldExit(0);
99 });
100
82 test("includes the full stack with verbose_trace: true", () { 101 test("includes the full stack with verbose_trace: true", () {
83 d.file("dart_test.yaml", JSON.encode({ 102 d.file("dart_test.yaml", JSON.encode({
84 "verbose_trace": true 103 "verbose_trace": true
85 })).create(); 104 })).create();
86 105
87 d.file("test.dart", """ 106 d.file("test.dart", """
88 import 'package:test/test.dart'; 107 import 'package:test/test.dart';
89 108
90 void main() { 109 void main() {
91 test("failure", () => throw "oh no"); 110 test("failure", () => throw "oh no");
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 test("failure", () => throw "oh no"); 554 test("failure", () => throw "oh no");
536 } 555 }
537 """) 556 """)
538 ]).create(); 557 ]).create();
539 558
540 var test = runTest([]); 559 var test = runTest([]);
541 test.stdout.expect(consumeThrough(contains('All tests passed!'))); 560 test.stdout.expect(consumeThrough(contains('All tests passed!')));
542 test.shouldExit(0); 561 test.shouldExit(0);
543 }); 562 });
544 } 563 }
OLDNEW
« no previous file with comments | « test/runner/configuration/configuration_test.dart ('k') | test/runner/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698