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

Unified Diff: tests/language/const_locals_test.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 80chars. 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
Index: tests/language/const_locals_test.dart
diff --git a/tests/language/const_locals_test.dart b/tests/language/const_locals_test.dart
index 9d7e6689413adad8ee15dd6792d2b7c0c48beeb9..3fed75fa1b827aa551f51cfc65fd58da12384276 100644
--- a/tests/language/const_locals_test.dart
+++ b/tests/language/const_locals_test.dart
@@ -19,13 +19,13 @@ main() {
Expect.equals(16, MAX);
Expect.equals(65535, MASK);
const s = 'MIN = $MIN MAX = $MAX MASK = $MASK';
- Expect.isTrue(s === 'MIN = $MIN MAX = $MAX MASK = $MASK');
+ Expect.isTrue(identical(s, 'MIN = $MIN MAX = $MAX MASK = $MASK'));
Lasse Reichstein Nielsen 2012/11/12 13:10:41 Expect.identical
floitsch 2012/11/12 22:18:43 Done.
Expect.equals("MIN = 1 MAX = 16 MASK = 65535", s);
var cf1 = const ConstFoo(MASK);
var cf2 = const ConstFoo(s);
var cf3 = const ConstFoo('MIN = $MIN MAX = $MAX MASK = $MASK');
- Expect.isTrue(cf2 === cf3);
- Expect.isFalse(cf2 === cf1);
+ Expect.isTrue(identical(cf2, cf3));
+ Expect.isFalse(identical(cf2, cf1));
}

Powered by Google App Engine
This is Rietveld 408576698