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

Unified Diff: test/runner/expanded_reporter_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/runner/engine_test.dart ('k') | test/runner/json_reporter_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/expanded_reporter_test.dart
diff --git a/test/runner/expanded_reporter_test.dart b/test/runner/expanded_reporter_test.dart
index 188bc7f0210f891dba6174bc4553a2d857e92efa..20b004d1d94166d49b7eabb4b3850cfa9669728a 100644
--- a/test/runner/expanded_reporter_test.dart
+++ b/test/runner/expanded_reporter_test.dart
@@ -259,8 +259,10 @@ void main() {
test('test 3', () {});
}, skip: true);""",
"""
- +0: skip
- +0 ~1: All tests skipped.""");
+ +0: skip test 1
+ +0 ~1: skip test 2
+ +0 ~2: skip test 3
+ +0 ~3: All tests skipped.""");
});
test("runs skipped tests along with successful tests", () {
@@ -314,10 +316,21 @@ void main() {
Skip: or another
+0 ~2: All tests skipped.""");
});
+
+ test("runs skipped tests with --run-skipped", () {
+ _expectReport("""
+ test('skip 1', () {}, skip: 'some reason');
+ test('skip 2', () {}, skip: 'or another');""",
+ """
+ +0: skip 1
+ +1: skip 2
+ +2: All tests passed!""",
+ args: ["--run-skipped"]);
+ });
});
}
-void _expectReport(String tests, String expected) {
+void _expectReport(String tests, String expected, {List<String> args}) {
var dart = """
import 'dart:async';
@@ -330,7 +343,7 @@ $tests
d.file("test.dart", dart).create();
- var test = runTest(["test.dart"]);
+ var test = runTest(["test.dart"]..addAll(args ?? []));
test.shouldExit();
schedule(() async {
« no previous file with comments | « test/runner/engine_test.dart ('k') | test/runner/json_reporter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698