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

Unified Diff: tests/language/first_class_types_literals_test.dart

Issue 11417005: Do not canonicalize Type instances. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « tests/language/first_class_types_libraries_test.dart ('k') | tests/language/generic_creation_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/first_class_types_literals_test.dart
diff --git a/tests/language/first_class_types_literals_test.dart b/tests/language/first_class_types_literals_test.dart
index 360564e2da7ce405f9298b1fc8a3ebb15caf455f..df8d6d6b0ea0f50cbca5a317b2b57f7ce07b0e41 100644
--- a/tests/language/first_class_types_literals_test.dart
+++ b/tests/language/first_class_types_literals_test.dart
@@ -9,25 +9,25 @@ class D {}
typedef int Foo(bool b);
sameType(a, b) {
- Expect.identical(a.runtimeType, b.runtimeType);
+ Expect.equals(a.runtimeType, b.runtimeType);
}
main() {
// Test type literals.
- Expect.identical(int, int);
- Expect.isFalse(identical(int, num));
- Expect.identical(Foo, Foo);
+ Expect.equals(int, int);
sra1 2012/11/16 08:43:45 Since class literals are compile-time constants, I
karlklose 2012/11/16 13:42:43 They are not yet constants. I have a CL to make li
+ Expect.notEquals(int, num);
+ Expect.equals(Foo, Foo);
// Test that class literals return instances of Type.
Expect.isTrue((D).runtimeType is Type);
// Test that types from runtimeType and literals agree.
- Expect.identical(int, 1.runtimeType);
- Expect.identical(C, new C().runtimeType);
- Expect.identical(D, new D().runtimeType);
+ Expect.equals(int, 1.runtimeType);
+ Expect.equals(C, new C().runtimeType);
+ Expect.equals(D, new D().runtimeType);
// runtimeType on type is idempotent.
- Expect.identical((D).runtimeType, (D).runtimeType.runtimeType);
+ Expect.equals((D).runtimeType, (D).runtimeType.runtimeType);
// Test that operator calls on class literals go to Type.
Expect.throws(() => C = 1, (e) => e is NoSuchMethodError);
« no previous file with comments | « tests/language/first_class_types_libraries_test.dart ('k') | tests/language/generic_creation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698