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

Unified Diff: test/runner/json_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/expanded_reporter_test.dart ('k') | test/runner/runner_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/json_reporter_test.dart
diff --git a/test/runner/json_reporter_test.dart b/test/runner/json_reporter_test.dart
index 068f7e54c6e0968c6a0950c01ac0336f9df3b363..60d537360ffc9f5082b0782066279c7d25b978cd 100644
--- a/test/runner/json_reporter_test.dart
+++ b/test/runner/json_reporter_test.dart
@@ -365,12 +365,18 @@ void main() {
_suite(0),
_testStart(1, "loading test.dart", groupIDs: []),
_testDone(1, hidden: true),
- _group(2, testCount: 0),
- _group(3, name: "skip", parentID: 2, skip: true, testCount: 0,
- line: 6, column: 9),
- _testStart(4, "skip", groupIDs: [2, 3], skip: true,
+ _group(2, testCount: 3),
+ _group(3, name: "skip", parentID: 2, skip: true, testCount: 3,
line: 6, column: 9),
+ _testStart(4, "skip success 1", groupIDs: [2, 3], skip: true,
+ line: 7, column: 11),
_testDone(4, skipped: true),
+ _testStart(5, "skip success 2", groupIDs: [2, 3], skip: true,
+ line: 8, column: 11),
+ _testDone(5, skipped: true),
+ _testStart(6, "skip success 3", groupIDs: [2, 3], skip: true,
+ line: 9, column: 11),
+ _testDone(6, skipped: true),
_done()
]);
});
@@ -395,6 +401,25 @@ void main() {
_done()
]);
});
+
+ test("runs skipped tests with --run-skipped", () {
+ _expectReport("""
+ test('skip 1', () {}, skip: 'some reason');
+ test('skip 2', () {}, skip: 'or another');
+ """, [
+ _start,
+ _allSuites(),
+ _suite(0),
+ _testStart(1, "loading test.dart", groupIDs: []),
+ _testDone(1, hidden: true),
+ _group(2, testCount: 2),
+ _testStart(3, "skip 1", line: 6, column: 9),
+ _testDone(3),
+ _testStart(4, "skip 2", line: 7, column: 9),
+ _testDone(4),
+ _done()
+ ], args: ["--run-skipped"]);
+ });
});
group("reports line and column numbers for", () {
« no previous file with comments | « test/runner/expanded_reporter_test.dart ('k') | test/runner/runner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698