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

Unified Diff: test/runner/compact_reporter_test.dart

Issue 1219653003: Print the full names of tests where possible. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 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 | « pubspec.yaml ('k') | test/runner/expanded_reporter_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/compact_reporter_test.dart
diff --git a/test/runner/compact_reporter_test.dart b/test/runner/compact_reporter_test.dart
index 528ca375c2ab41d44c879858f47aeea82980403f..5a4b65610acf4ef9226ec83570c51aa542fe8b99 100644
--- a/test/runner/compact_reporter_test.dart
+++ b/test/runner/compact_reporter_test.dart
@@ -150,6 +150,24 @@ void main() {
+1 -1: Some tests failed.""");
});
+ test("prints the full test name before an error", () {
+ _expectReport("""
+ test(
+ 'really gosh dang long test name. Even longer than that. No, yet '
+ 'longer. A little more... okay, that should do it.',
+ () => throw new TestFailure('oh no'));""",
+ """
+ +0: loading test.dart
+ +0: really ... longer than that. No, yet longer. A little more... okay, that should do it.
+ +0 -1: really ... longer than that. No, yet longer. A little more... okay, that should do it.
+ +0 -1: really gosh dang long test name. Even longer than that. No, yet longer. A little more... okay, that should do it.
+ oh no
+ test.dart 9:18 main.<fn>
+
+
+ +0 -1: Some tests failed.""");
+ });
+
group("print:", () {
test("handles multiple prints", () {
_expectReport("""
@@ -254,6 +272,22 @@ void main() {
+1 -1: wait
+1 -1: Some tests failed.""");
});
+
+ test("prints the full test name before a print", () {
+ _expectReport("""
+ test(
+ 'really gosh dang long test name. Even longer than that. No, yet '
+ 'longer. A little more... okay, that should do it.',
+ () => print('hello'));""",
+ """
+ +0: loading test.dart
+ +0: really ... longer than that. No, yet longer. A little more... okay, that should do it.
+ +0: really gosh dang long test name. Even longer than that. No, yet longer. A little more... okay, that should do it.
+ hello
+
+ +1: really ... longer than that. No, yet longer. A little more... okay, that should do it.
+ +1: All tests passed!""");
+ });
});
group("skip:", () {
« no previous file with comments | « pubspec.yaml ('k') | test/runner/expanded_reporter_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698