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

Unified Diff: test/runner/runner_test.dart

Issue 1034813004: Add code to contextualize a span relative to its original source file. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Created 5 years, 9 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/string_literal_iterator.dart ('k') | test/util/string_literal_iterator_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/runner_test.dart
diff --git a/test/runner/runner_test.dart b/test/runner/runner_test.dart
index 478ff77d120815486ad820aae34aaa3d13eaabd4..692b1faa157c08c6e5bdd102d2c25267c8504f2d 100644
--- a/test/runner/runner_test.dart
+++ b/test/runner/runner_test.dart
@@ -128,6 +128,19 @@ $_usage"""));
expect(result.exitCode, equals(exit_codes.data));
});
+ test("an annotation's contents are invalid", () {
+ var testPath = p.join(_sandbox, "test.dart");
+ new File(testPath).writeAsStringSync("@TestOn('zim')\nlibrary foo;");
+ var result = _runUnittest(["test.dart"]);
+
+ expect(result.stderr, equals(
+ 'Failed to load "${p.relative(testPath, from: _sandbox)}":\n'
+ "Error on line 1, column 10: Undefined variable.\n"
+ "@TestOn('zim')\n"
+ " ^^^\n"));
+ expect(result.exitCode, equals(exit_codes.data));
+ });
+
test("a test file throws", () {
var testPath = p.join(_sandbox, "test.dart");
new File(testPath).writeAsStringSync("void main() => throw 'oh no';");
« no previous file with comments | « lib/src/util/string_literal_iterator.dart ('k') | test/util/string_literal_iterator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698