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

Unified Diff: tests/language/canonical_const_test.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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/canonical_const2_test.dart ('k') | tests/language/class_literal_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/canonical_const_test.dart
diff --git a/tests/language/canonical_const_test.dart b/tests/language/canonical_const_test.dart
index c10ce62b81cf025621faf71b4b3040d630ec0c69..4c91baaf2c210488f4994d512309a876ae8fc228 100644
--- a/tests/language/canonical_const_test.dart
+++ b/tests/language/canonical_const_test.dart
@@ -8,26 +8,26 @@ class CanonicalConstTest {
static const B = const C2();
static testMain() {
- Expect.isTrue(null===null);
- Expect.isTrue(null!==0);
- Expect.isTrue(1===1);
- Expect.isTrue(1!==2);
- Expect.isTrue(true===true);
- Expect.isTrue("so"==="so");
- Expect.isTrue(const Object()===const Object());
- Expect.isTrue(const Object()!==const C1());
- Expect.isTrue(const C1()===const C1());
- Expect.isTrue(A===const C1());
- Expect.isTrue(const C1()!==const C2());
- Expect.isTrue(B===const C2());
+ Expect.identical(null, null);
+ Expect.isFalse(identical(null, 0));
+ Expect.identical(1, 1);
+ Expect.isFalse(identical(1, 2));
+ Expect.identical(true, true);
+ Expect.identical("so", "so");
+ Expect.identical(const Object(), const Object());
+ Expect.isFalse(identical(const Object(), const C1()));
+ Expect.identical(const C1(), const C1());
+ Expect.identical(A, const C1());
+ Expect.isFalse(identical(const C1(), const C2()));
+ Expect.identical(B, const C2());
// TODO(johnlenz): these two values don't currently have the same type
// Expect.isTrue(const [1,2] === const List[1,2]);
- Expect.isTrue(const [2,1] !== const[1,2]);
- Expect.isTrue(const <int>[1,2] === const <int>[1,2]);
- Expect.isTrue(const <Object>[1,2] === const <Object>[1,2]);
- Expect.isTrue(const <int>[1,2] !== const <double>[1.0,2.0]);
- Expect.isTrue(const {"a":1, "b":2} === const {"a":1, "b":2});
- Expect.isTrue(const {"a":1, "b":2} !== const {"a":2, "b":2});
+ Expect.isFalse(identical(const [2,1], const[1,2]));
+ Expect.identical(const <int>[1,2], const <int>[1,2]);
+ Expect.identical(const <Object>[1,2], const <Object>[1,2]);
+ Expect.isFalse(identical(const <int>[1,2], const <double>[1.0,2.0]));
+ Expect.identical(const {"a":1, "b":2}, const {"a":1, "b":2});
+ Expect.isFalse(identical(const {"a":1, "b":2}, const {"a":2, "b":2}));
}
}
« no previous file with comments | « tests/language/canonical_const2_test.dart ('k') | tests/language/class_literal_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698