Index: tests/language/class_literal_test.dart |
diff --git a/tests/language/class_literal_test.dart b/tests/language/class_literal_test.dart |
index 58de6dd3bc0a8e48f3d614611f73071337512d24..161073d25d9e8136d27c8271ad7dc4520b554026 100644 |
--- a/tests/language/class_literal_test.dart |
+++ b/tests/language/class_literal_test.dart |
@@ -15,7 +15,7 @@ foo(x) {} |
main() { |
Expect.equals(42, Class.fisk()); |
Expect.equals(null, foo(Class.fisk())); |
- |
+ |
// Verify references to a class literal are allowed. |
Class; |
var x = Class; |
@@ -23,38 +23,38 @@ main() { |
Expect.isFalse(Class == null); |
// Verify that dereferencing a class literal is a runtime error. |
- Expect.throws(() { Class(); }, (e) => e is NoSuchMethodError); /// 01: static type warning |
- Expect.throws(() { Class[0]; }, (e) => e is NoSuchMethodError); /// 02: static type warning |
- Expect.throws(() { var x = Class(); }, (e) => e is NoSuchMethodError); /// 03: static type warning |
- Expect.throws(() { var x = Class[0]; }, (e) => e is NoSuchMethodError); /// 04: static type warning |
- Expect.throws(() { var x = Class[0].field; }, (e) => e is NoSuchMethodError); /// 05: static type warning |
- Expect.throws(() { var x = Class[0].method(); }, (e) => e is NoSuchMethodError); /// 06: static type warning |
- Expect.throws(() { foo(Class()); }, (e) => e is NoSuchMethodError); /// 07: static type warning |
- Expect.throws(() { foo(Class[0]); }, (e) => e is NoSuchMethodError); /// 08: static type warning |
- Expect.throws(() { foo(Class[0].field); }, (e) => e is NoSuchMethodError); /// 09: static type warning |
- Expect.throws(() { foo(Class[0].method()); }, (e) => e is NoSuchMethodError); /// 10: static type warning |
- Expect.throws(() { Class[0] = 91; }, (e) => e is NoSuchMethodError); /// 11: static type warning |
- Expect.throws(() { Class++; }, (e) => e is NoSuchMethodError); /// 12: static type warning |
- Expect.throws(() { ++Class; }, (e) => e is NoSuchMethodError); /// 13: static type warning |
- Expect.throws(() { Class[0] += 3; }, (e) => e is NoSuchMethodError); /// 14: static type warning |
- Expect.throws(() { ++Class[0]; }, (e) => e is NoSuchMethodError); /// 15: static type warning |
- Expect.throws(() { Class[0]++; }, (e) => e is NoSuchMethodError); /// 16: static type warning |
- Expect.throws(() { Class.method(); }, (e) => e is NoSuchMethodError); /// 17: static type warning |
- Expect.throws(() { Class.field; }, (e) => e is NoSuchMethodError); /// 18: static type warning |
- Expect.throws(() { var x = Class.method(); }, (e) => e is NoSuchMethodError); /// 19: static type warning |
- Expect.throws(() { var x = Class.field; }, (e) => e is NoSuchMethodError); /// 20: static type warning |
- Expect.throws(() { foo(Class.method()); }, (e) => e is NoSuchMethodError); /// 21: static type warning |
- Expect.throws(() { foo(Class.field); }, (e) => e is NoSuchMethodError); /// 22: static type warning |
- Expect.throws(() { Class / 3; }, (e) => e is NoSuchMethodError); /// 23: static type warning |
- Expect.throws(() { Class += 3; }, (e) => e is NoSuchMethodError); /// 24: static type warning |
+ Expect.throws(() { Class(); }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { Class[0]; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { var x = Class(); }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { var x = Class[0]; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { var x = Class[0].field; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { var x = Class[0].method(); }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { foo(Class()); }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { foo(Class[0]); }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { foo(Class[0].field); }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { foo(Class[0].method()); }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { Class[0] = 91; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { Class++; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { ++Class; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { Class[0] += 3; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { ++Class[0]; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { Class[0]++; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { Class.method(); }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { Class.field; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { var x = Class.method(); }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { var x = Class.field; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { foo(Class.method()); }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { foo(Class.field); }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { Class / 3; }, (e) => e is NoSuchMethodError); |
+ Expect.throws(() { Class += 3; }, (e) => e is NoSuchMethodError); |
// Verify that a class literal isn't a string literal. |
Expect.notEquals(Class, "Class"); |
- |
+ |
// Verify toString() works for class literals. |
Expect.isTrue((Class).toString() is String); |
var y = Class; |
Expect.isTrue(y.toString() is String); |
- |
- Expect.throws(() { Class.toString(); }, (e) => e is NoSuchMethodError); /// 25: static type warning |
+ |
+ Expect.throws(() { Class.toString(); }, (e) => e is NoSuchMethodError); |
} |