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

Unified Diff: tests/language/strict_equal_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/static_const_field_test.dart ('k') | tests/standalone/io/echo_server_stream_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/strict_equal_test.dart
diff --git a/tests/language/strict_equal_test.dart b/tests/language/strict_equal_test.dart
index 1af02912a05d44aa29818e0ead408fe4f0554ec9..1cd00a9d6ffbfefea0bb55aedde5ae5bcec79606 100644
--- a/tests/language/strict_equal_test.dart
+++ b/tests/language/strict_equal_test.dart
@@ -43,26 +43,26 @@ main() {
test1(a) {
- return a === 3;
+ return identical(a, 3);
}
test2(a) {
- return a !== 3;
+ return !identical(a, 3);
}
test2r(a) {
- return 3 !== a;
+ return !identical(3, a);
}
test3() {
- return get5() === 5;
+ return identical(get5(), 5);
}
test4(a) {
- if (a === 3) {
+ if (identical(a, 3)) {
return 1;
} else {
return 2;
@@ -71,7 +71,7 @@ test4(a) {
test5(a) {
- if (a !== 3) {
+ if (!identical(a, 3)) {
return 1;
} else {
return 2;
@@ -80,7 +80,7 @@ test5(a) {
test6() {
- if (get5() === 5) {
+ if (identical(get5(), 5)) {
return 1;
} else {
return 2;
@@ -92,12 +92,12 @@ get5() {
}
test7() {
- return null !== null;
+ return null != null;
}
test8() {
- if (null !== null) {
+ if (null != null) {
return 1;
} else {
return 2;
@@ -106,31 +106,31 @@ test8() {
test9(a) {
- return a === 0;
+ return identical(a, 0);
}
test9r(a) {
- return 0 === a;
+ return identical(0, a);
}
test10(a) {
- return a !== 0;
+ return !identical(a, 0);
}
test10r(a) {
- return 0 !== a;
+ return !identical(0, a);
}
test11(a) {
- if (a === 0) {
- Expect.isTrue(0 === a);
- Expect.isFalse(a !== 0);
- Expect.isFalse(0 !== a);
+ if (identical(a, 0)) {
+ Expect.isTrue(identical(0, a));
+ Expect.isFalse(!identical(a, 0));
+ Expect.isFalse(!identical(0, a));
} else {
- Expect.isFalse(0 === a);
- Expect.isTrue(a !== 0);
- Expect.isTrue(0 !== a);
+ Expect.isFalse(identical(0, a));
+ Expect.isTrue(!identical(a, 0));
+ Expect.isTrue(!identical(0, a));
}
}
« no previous file with comments | « tests/language/static_const_field_test.dart ('k') | tests/standalone/io/echo_server_stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698