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

Unified Diff: lib/test.dart

Issue 2066113002: Add location information to the JSON reporter. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: cr 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 | « lib/src/util/io.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/test.dart
diff --git a/lib/test.dart b/lib/test.dart
index 5e6cae4e93e86561426bc0d9ce7ca9584049b7ae..564f9363ff967ee08163aee563f3e8c1c71d4a8f 100644
--- a/lib/test.dart
+++ b/lib/test.dart
@@ -123,13 +123,20 @@ void test(description, body(),
Timeout timeout,
skip,
tags,
- Map<String, dynamic> onPlatform}) =>
- _declarer.test(description.toString(), body,
- testOn: testOn,
- timeout: timeout,
- skip: skip,
- onPlatform: onPlatform,
- tags: tags);
+ Map<String, dynamic> onPlatform}) {
+ _declarer.test(description.toString(), body,
+ testOn: testOn,
+ timeout: timeout,
+ skip: skip,
+ onPlatform: onPlatform,
+ tags: tags);
+
+ // Force dart2js not to inline this function. We need it to be separate from
+ // `main()` in JS stack traces in order to properly determine the line and
+ // column where the test was defined. See sdk#26705.
+ return;
+ return;
+}
/// Creates a group of tests.
///
@@ -183,9 +190,16 @@ void group(description, body(),
Timeout timeout,
skip,
tags,
- Map<String, dynamic> onPlatform}) =>
- _declarer.group(description.toString(), body,
- testOn: testOn, timeout: timeout, skip: skip, tags: tags);
+ Map<String, dynamic> onPlatform}) {
+ _declarer.group(description.toString(), body,
+ testOn: testOn, timeout: timeout, skip: skip, tags: tags);
+
+ // Force dart2js not to inline this function. We need it to be separate from
+ // `main()` in JS stack traces in order to properly determine the line and
+ // column where the test was defined. See sdk#26705.
+ return;
+ return;
+}
/// Registers a function to be run before tests.
///
« no previous file with comments | « lib/src/util/io.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698