Index: test/codegen/language/runtime_type_test.dart |
diff --git a/test/codegen/language/runtime_type_test.dart b/test/codegen/language/runtime_type_test.dart |
index 158f97479d3ce40bfb0330643ac56415f2b1568a..8971ff908be2e8e97964da538ed81e63525189af 100644 |
--- a/test/codegen/language/runtime_type_test.dart |
+++ b/test/codegen/language/runtime_type_test.dart |
@@ -5,11 +5,31 @@ |
import "package:expect/expect.dart"; |
class A { |
- get className => runtimeType; |
+} |
+ |
+class B { |
} |
main() { |
- Expect.isTrue(new A().className is Type); |
+ var a = new A(); |
+ var b = new B(); |
+ var f = () => null; |
+ var classA = A; |
+ var classB = B; |
+ |
+ Expect.isTrue(a.runtimeType is Type); |
+ Expect.equals(A, a.runtimeType); |
+ Expect.notEquals(B, a.runtimeType); |
+ Expect.notEquals(A, b.runtimeType); |
+ |
+ Expect.isTrue(f.runtimeType is Type); |
+ Expect.isFalse(f.runtimeType == a.runtimeType); |
+ |
+ Expect.isTrue(classA.runtimeType is Type); |
+ Expect.isTrue(classA.runtimeType == classB.runtimeType); |
+ Expect.isFalse(classA.runtimeType == a.runtimeType); |
+ Expect.isFalse(classA.runtimeType == f.runtimeType); |
Jennifer Messerly
2016/06/27 18:04:01
Oh nice fix!
Should we add a test like:
Expect.i
andrewkrieger
2016/06/27 22:24:54
Done. Will land the CL soon.
|
+ |
Expect.isTrue(null.runtimeType is Type); |
- Expect.equals(null.runtimeType, Null); |
+ Expect.equals(Null, null.runtimeType); |
} |