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

Unified Diff: test/runner/parse_metadata_test.dart

Issue 1256833003: Add Timeout.none. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Fix invoker_test. Created 5 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/backend/invoker_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/parse_metadata_test.dart
diff --git a/test/runner/parse_metadata_test.dart b/test/runner/parse_metadata_test.dart
index 6c45253b7662192acefd5298e42ec2297939c924..5e682d4e5d76dff1665e9ece1082497aa98aa0a9 100644
--- a/test/runner/parse_metadata_test.dart
+++ b/test/runner/parse_metadata_test.dart
@@ -144,6 +144,16 @@ library foo;
expect(metadata.timeout.scaleFactor, equals(0.5));
});
+ test("parses a valid Timeout.none annotation", () {
+ new File(_path).writeAsStringSync("""
+@Timeout.none
+
+library foo;
+""");
+ var metadata = parseMetadata(_path);
+ expect(metadata.timeout, same(Timeout.none));
+ });
+
test("ignores a constructor named Timeout", () {
new File(_path).writeAsStringSync("@foo.Timeout('foo')\nlibrary foo;");
var metadata = parseMetadata(_path);
@@ -166,6 +176,11 @@ library foo;
expect(() => parseMetadata(_path), throwsFormatException);
});
+ test("an argument list for Timeout.none", () {
+ new File(_path).writeAsStringSync("@Timeout.none()\nlibrary foo;");
+ expect(() => parseMetadata(_path), throwsFormatException);
+ });
+
test("a named argument", () {
new File(_path).writeAsStringSync(
"@Timeout(duration: const Duration(seconds: 1))\nlibrary foo;");
« no previous file with comments | « test/backend/invoker_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698