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

Unified Diff: test/runner/json_reporter_test.dart

Issue 2099503002: Add a dedicated Result for skipped tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 6 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') | no next file » | 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 48b60e477df1a0d0ef629e5bf20957af9d84e07a..be155d95ba51b94d0c4bfacbc74cb4176781ad85 100644
--- a/test/runner/json_reporter_test.dart
+++ b/test/runner/json_reporter_test.dart
@@ -343,11 +343,11 @@ void main() {
_testDone(1, hidden: true),
_group(2, testCount: 3),
_testStart(3, "skip 1", skip: true, line: 6, column: 9),
- _testDone(3),
+ _testDone(3, skipped: true),
_testStart(4, "skip 2", skip: true, line: 7, column: 9),
- _testDone(4),
+ _testDone(4, skipped: true),
_testStart(5, "skip 3", skip: true, line: 8, column: 9),
- _testDone(5),
+ _testDone(5, skipped: true),
_done()
]);
});
@@ -370,7 +370,7 @@ void main() {
line: 6, column: 9),
_testStart(4, "skip", groupIDs: [2, 3], skip: true,
line: 6, column: 9),
- _testDone(4),
+ _testDone(4, skipped: true),
_done()
]);
});
@@ -387,9 +387,9 @@ void main() {
_testDone(1, hidden: true),
_group(2, testCount: 2),
_testStart(3, "skip 1", skip: "some reason", line: 6, column: 9),
- _testDone(3),
+ _testDone(3, skipped: true),
_testStart(4, "skip 2", skip: "or another", line: 7, column: 9),
- _testDone(4),
+ _testDone(4, skipped: true),
_done()
]);
});
@@ -631,10 +631,18 @@ Map _error(int id, String error, {bool isFailure: false}) {
/// `"success"`.
///
/// The [hidden] parameter indicates whether the test should not be displayed
-/// after finishing.
-Map _testDone(int id, {String result, bool hidden: false}) {
+/// after finishing. The [skipped] parameter indicates whether the test was
+/// skipped.
+Map _testDone(int id, {String result, bool hidden: false,
+ bool skipped: false}) {
result ??= "success";
- return {"type": "testDone", "testID": id, "result": result, "hidden": hidden};
+ return {
+ "type": "testDone",
+ "testID": id,
+ "result": result,
+ "hidden": hidden,
+ "skipped": skipped
+ };
}
/// Returns the event emitted by the JSON reporter indicating that the entire
« no previous file with comments | « test/runner/engine_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698