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;"); |