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

Unified Diff: pkg/dev_compiler/test/codegen_expected/equality_test.js

Issue 2926613003: Generate better code for '=='. (Closed)
Patch Set: Address comments Created 3 years, 6 months 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: pkg/dev_compiler/test/codegen_expected/equality_test.js
diff --git a/pkg/dev_compiler/test/codegen_expected/equality_test.js b/pkg/dev_compiler/test/codegen_expected/equality_test.js
index a8c227291ecac5cb37a2390c0162ad845f8b3bdd..8443c33942d39e3b9a0ea57707187240884e6d54 100644
--- a/pkg/dev_compiler/test/codegen_expected/equality_test.js
+++ b/pkg/dev_compiler/test/codegen_expected/equality_test.js
@@ -67,13 +67,13 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let d2 = equality_test.hideNull(equality_test.Music)(equality_test.Music.western);
let o1 = equality_test.hideNull(core.Object)(equality_test.Music.country);
let o2 = equality_test.hideNull(core.Object)(equality_test.Music.western);
- minitest.expect(dart.equals(e1, e1), true);
- minitest.expect(dart.equals(e1, d1), true);
- minitest.expect(dart.equals(e1, o1), true);
- minitest.expect(dart.equals(e1, e2), false);
- minitest.expect(dart.equals(e1, o2), false);
- minitest.expect(dart.equals(e1, d2), false);
- minitest.expect(dart.equals(e1, e2), false);
+ minitest.expect(e1 == e1, true);
+ minitest.expect(core.identical(e1, d1), true);
+ minitest.expect(core.identical(e1, o1), true);
+ minitest.expect(e1 == e2, false);
+ minitest.expect(core.identical(e1, o2), false);
+ minitest.expect(core.identical(e1, d2), false);
+ minitest.expect(e1 == e2, false);
minitest.expect(dart.equals(d1, e1), true);
minitest.expect(dart.equals(d1, d1), true);
minitest.expect(dart.equals(d1, o1), true);
@@ -94,13 +94,13 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let d2 = equality_test.Music.western;
let o1 = equality_test.Music.country;
let o2 = equality_test.Music.western;
- minitest.expect(dart.equals(e1, e1), true);
- minitest.expect(dart.equals(e1, d1), true);
- minitest.expect(dart.equals(e1, o1), true);
- minitest.expect(dart.equals(e1, e2), false);
- minitest.expect(dart.equals(e1, o2), false);
- minitest.expect(dart.equals(e1, d2), false);
- minitest.expect(dart.equals(e1, e2), false);
+ minitest.expect(e1 === e1, true);
+ minitest.expect(e1 === d1, true);
+ minitest.expect(e1 === o1, true);
+ minitest.expect(e1 === e2, false);
+ minitest.expect(e1 === o2, false);
+ minitest.expect(e1 === d2, false);
+ minitest.expect(e1 === e2, false);
minitest.expect(dart.equals(d1, e1), true);
minitest.expect(dart.equals(d1, d1), true);
minitest.expect(dart.equals(d1, o1), true);
@@ -122,16 +122,16 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = equality_test.hideNull(core.int)(0);
let l1 = equality_test.hideNull(core.List)(core.List.new(3));
let b1 = equality_test.hideNull(equality_test.BluesBrother)(new equality_test._Norman.new());
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
+ minitest.expect(core.identical(e1, s1), false);
+ minitest.expect(core.identical(e1, s2), false);
+ minitest.expect(core.identical(e1, i1), false);
+ minitest.expect(core.identical(e1, i2), false);
+ minitest.expect(e1 == l1, false);
+ minitest.expect(e1 == b1, false);
+ minitest.expect(core.identical(s1, e1), false);
+ minitest.expect(core.identical(s2, e1), false);
+ minitest.expect(core.identical(i1, e1), false);
+ minitest.expect(core.identical(i2, e1), false);
minitest.expect(dart.equals(l1, e1), false);
minitest.expect(dart.equals(b1, e1), false);
}, VoidToNull()));
@@ -143,18 +143,18 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1 === s1, false);
+ minitest.expect(e1 === s2, false);
+ minitest.expect(e1 === i1, false);
+ minitest.expect(e1 === i2, false);
+ minitest.expect(e1 === l1, false);
+ minitest.expect(e1 === b1, false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
}, VoidToNull()));
minitest.test('Equal enum/other (dynamic, nullable)', dart.fn(() => {
let e1 = equality_test.hideNull(equality_test.Music)(equality_test.Music.country);
@@ -165,12 +165,12 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = equality_test.hideNull(core.int)(0);
let l1 = equality_test.hideNull(core.List)(core.List.new(3));
let b1 = equality_test.hideNull(equality_test._Norman)(new equality_test._Norman.new());
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
+ minitest.expect(core.identical(e1, s1), false);
+ minitest.expect(core.identical(e1, s2), false);
+ minitest.expect(core.identical(e1, i1), false);
+ minitest.expect(core.identical(e1, i2), false);
+ minitest.expect(core.identical(e1, l1), false);
+ minitest.expect(core.identical(e1, b1), false);
minitest.expect(dart.equals(s1, e1), false);
minitest.expect(dart.equals(s2, e1), false);
minitest.expect(dart.equals(i1, e1), false);
@@ -199,30 +199,30 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1 === s1, false);
+ minitest.expect(e1 === s2, false);
+ minitest.expect(e1 === i1, false);
+ minitest.expect(e1 === i2, false);
+ minitest.expect(e1 === l1, false);
+ minitest.expect(e1 === b1, false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
minitest.expect(dart.equals(d1, s1), false);
minitest.expect(dart.equals(d1, s2), false);
minitest.expect(dart.equals(d1, i1), false);
minitest.expect(dart.equals(d1, i2), false);
minitest.expect(dart.equals(d1, l1), false);
minitest.expect(dart.equals(d1, b1), false);
- minitest.expect(dart.equals(s1, d1), false);
- minitest.expect(dart.equals(s2, d1), false);
- minitest.expect(dart.equals(i1, d1), false);
- minitest.expect(dart.equals(i2, d1), false);
- minitest.expect(dart.equals(l1, d1), false);
- minitest.expect(dart.equals(b1, d1), false);
+ minitest.expect(s1 === d1, false);
+ minitest.expect(s2 === d1, false);
+ minitest.expect(i1 === d1, false);
+ minitest.expect(i2 === d1, false);
+ minitest.expect(l1[dartx['==']](d1), false);
+ minitest.expect(b1['=='](d1), false);
}, VoidToNull()));
}, VoidToNull()));
minitest.group('String equality', dart.fn(() => {
@@ -234,11 +234,11 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let o1 = equality_test.hideNull(core.Object)("The");
let o2 = equality_test.hideNull(core.Object)("Band");
minitest.expect(e1 == e1, true);
- minitest.expect(dart.equals(e1, d1), true);
- minitest.expect(dart.equals(e1, o1), true);
+ minitest.expect(core.identical(e1, d1), true);
+ minitest.expect(core.identical(e1, o1), true);
minitest.expect(e1 == e2, false);
- minitest.expect(dart.equals(e1, o2), false);
- minitest.expect(dart.equals(e1, d2), false);
+ minitest.expect(core.identical(e1, o2), false);
+ minitest.expect(core.identical(e1, d2), false);
minitest.expect(e1 == e2, false);
minitest.expect(dart.equals(d1, e1), true);
minitest.expect(dart.equals(d1, d1), true);
@@ -260,13 +260,13 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let d2 = "Band";
let o1 = "The";
let o2 = "Band";
- minitest.expect(e1 == e1, true);
- minitest.expect(dart.equals(e1, d1), true);
- minitest.expect(dart.equals(e1, o1), true);
- minitest.expect(e1 == e2, false);
- minitest.expect(dart.equals(e1, o2), false);
- minitest.expect(dart.equals(e1, d2), false);
- minitest.expect(e1 == e2, false);
+ minitest.expect(e1 === e1, true);
+ minitest.expect(e1 === d1, true);
+ minitest.expect(e1 === o1, true);
+ minitest.expect(e1 === e2, false);
+ minitest.expect(e1 === o2, false);
+ minitest.expect(e1 === d2, false);
+ minitest.expect(e1 === e2, false);
minitest.expect(dart.equals(d1, e1), true);
minitest.expect(dart.equals(d1, d1), true);
minitest.expect(dart.equals(d1, o1), true);
@@ -290,14 +290,14 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let b1 = equality_test.hideNull(equality_test.BluesBrother)(new equality_test._Norman.new());
minitest.expect(e1 == s1, false);
minitest.expect(e1 == s2, false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
+ minitest.expect(core.identical(e1, i1), false);
+ minitest.expect(core.identical(e1, i2), false);
+ minitest.expect(core.identical(e1, l1), false);
+ minitest.expect(core.identical(e1, b1), false);
minitest.expect(s1 == e1, false);
minitest.expect(s2 == e1, false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
+ minitest.expect(core.identical(i1, e1), false);
+ minitest.expect(core.identical(i2, e1), false);
minitest.expect(dart.equals(l1, e1), false);
minitest.expect(dart.equals(b1, e1), false);
}, VoidToNull()));
@@ -309,18 +309,18 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(e1 == s1, false);
- minitest.expect(e1 == s2, false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(s1 == e1, false);
- minitest.expect(s2 == e1, false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1 === s1, false);
+ minitest.expect(e1 === s2, false);
+ minitest.expect(e1 === i1, false);
+ minitest.expect(e1 === i2, false);
+ minitest.expect(e1 === l1, false);
+ minitest.expect(e1 === b1, false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
}, VoidToNull()));
minitest.test('Equal string/other (dynamic, nullable)', dart.fn(() => {
let e1 = equality_test.hideNull(core.String)("The");
@@ -331,12 +331,12 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = equality_test.hideNull(core.int)(0);
let l1 = equality_test.hideNull(core.List)(core.List.new(3));
let b1 = equality_test.hideNull(equality_test._Norman)(new equality_test._Norman.new());
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
+ minitest.expect(core.identical(e1, s1), false);
+ minitest.expect(core.identical(e1, s2), false);
+ minitest.expect(core.identical(e1, i1), false);
+ minitest.expect(core.identical(e1, i2), false);
+ minitest.expect(core.identical(e1, l1), false);
+ minitest.expect(core.identical(e1, b1), false);
minitest.expect(dart.equals(s1, e1), false);
minitest.expect(dart.equals(s2, e1), false);
minitest.expect(dart.equals(i1, e1), false);
@@ -365,30 +365,30 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(e1 == s1, false);
- minitest.expect(e1 == s2, false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(s1 == e1, false);
- minitest.expect(s2 == e1, false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1 === s1, false);
+ minitest.expect(e1 === s2, false);
+ minitest.expect(e1 === i1, false);
+ minitest.expect(e1 === i2, false);
+ minitest.expect(e1 === l1, false);
+ minitest.expect(e1 === b1, false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
minitest.expect(dart.equals(d1, s1), false);
minitest.expect(dart.equals(d1, s2), false);
minitest.expect(dart.equals(d1, i1), false);
minitest.expect(dart.equals(d1, i2), false);
minitest.expect(dart.equals(d1, l1), false);
minitest.expect(dart.equals(d1, b1), false);
- minitest.expect(dart.equals(s1, d1), false);
- minitest.expect(dart.equals(s2, d1), false);
- minitest.expect(dart.equals(i1, d1), false);
- minitest.expect(dart.equals(i2, d1), false);
- minitest.expect(dart.equals(l1, d1), false);
- minitest.expect(dart.equals(b1, d1), false);
+ minitest.expect(s1 === d1, false);
+ minitest.expect(s2 === d1, false);
+ minitest.expect(i1 === d1, false);
+ minitest.expect(i2 === d1, false);
+ minitest.expect(l1[dartx['==']](d1), false);
+ minitest.expect(b1['=='](d1), false);
}, VoidToNull()));
}, VoidToNull()));
minitest.group('Boolean equality', dart.fn(() => {
@@ -400,11 +400,11 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let o1 = equality_test.hideNull(core.Object)(true);
let o2 = equality_test.hideNull(core.Object)(false);
minitest.expect(e1 == e1, true);
- minitest.expect(dart.equals(e1, d1), true);
- minitest.expect(dart.equals(e1, o1), true);
+ minitest.expect(core.identical(e1, d1), true);
+ minitest.expect(core.identical(e1, o1), true);
minitest.expect(e1 == e2, false);
- minitest.expect(dart.equals(e1, o2), false);
- minitest.expect(dart.equals(e1, d2), false);
+ minitest.expect(core.identical(e1, o2), false);
+ minitest.expect(core.identical(e1, d2), false);
minitest.expect(e1 == e2, false);
minitest.expect(dart.equals(d1, e1), true);
minitest.expect(dart.equals(d1, d1), true);
@@ -426,13 +426,13 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let d2 = false;
let o1 = true;
let o2 = false;
- minitest.expect(e1 == e1, true);
- minitest.expect(dart.equals(e1, d1), true);
- minitest.expect(dart.equals(e1, o1), true);
- minitest.expect(e1 == e2, false);
- minitest.expect(dart.equals(e1, o2), false);
- minitest.expect(dart.equals(e1, d2), false);
- minitest.expect(e1 == e2, false);
+ minitest.expect(e1 === e1, true);
+ minitest.expect(e1 === d1, true);
+ minitest.expect(e1 === o1, true);
+ minitest.expect(e1 === e2, false);
+ minitest.expect(e1 === o2, false);
+ minitest.expect(e1 === d2, false);
+ minitest.expect(e1 === e2, false);
minitest.expect(dart.equals(d1, e1), true);
minitest.expect(dart.equals(d1, d1), true);
minitest.expect(dart.equals(d1, o1), true);
@@ -454,16 +454,16 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = equality_test.hideNull(core.int)(0);
let l1 = equality_test.hideNull(core.List)(core.List.new(3));
let b1 = equality_test.hideNull(equality_test.BluesBrother)(new equality_test._Norman.new());
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
+ minitest.expect(core.identical(e1, s1), false);
+ minitest.expect(core.identical(e1, s2), false);
+ minitest.expect(core.identical(e1, i1), false);
+ minitest.expect(core.identical(e1, i2), false);
+ minitest.expect(core.identical(e1, l1), false);
+ minitest.expect(core.identical(e1, b1), false);
+ minitest.expect(core.identical(s1, e1), false);
+ minitest.expect(core.identical(s2, e1), false);
+ minitest.expect(core.identical(i1, e1), false);
+ minitest.expect(core.identical(i2, e1), false);
minitest.expect(dart.equals(l1, e1), false);
minitest.expect(dart.equals(b1, e1), false);
}, VoidToNull()));
@@ -475,18 +475,18 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1 === s1, false);
+ minitest.expect(e1 === s2, false);
+ minitest.expect(e1 === i1, false);
+ minitest.expect(e1 === i2, false);
+ minitest.expect(e1 === l1, false);
+ minitest.expect(e1 === b1, false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
}, VoidToNull()));
minitest.test('Equal bool/other (dynamic, nullable)', dart.fn(() => {
let e1 = equality_test.hideNull(core.bool)(true);
@@ -497,12 +497,12 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = equality_test.hideNull(core.int)(0);
let l1 = equality_test.hideNull(core.List)(core.List.new(3));
let b1 = equality_test.hideNull(equality_test._Norman)(new equality_test._Norman.new());
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
+ minitest.expect(core.identical(e1, s1), false);
+ minitest.expect(core.identical(e1, s2), false);
+ minitest.expect(core.identical(e1, i1), false);
+ minitest.expect(core.identical(e1, i2), false);
+ minitest.expect(core.identical(e1, l1), false);
+ minitest.expect(core.identical(e1, b1), false);
minitest.expect(dart.equals(s1, e1), false);
minitest.expect(dart.equals(s2, e1), false);
minitest.expect(dart.equals(i1, e1), false);
@@ -531,30 +531,30 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1 === s1, false);
+ minitest.expect(e1 === s2, false);
+ minitest.expect(e1 === i1, false);
+ minitest.expect(e1 === i2, false);
+ minitest.expect(e1 === l1, false);
+ minitest.expect(e1 === b1, false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
minitest.expect(dart.equals(d1, s1), false);
minitest.expect(dart.equals(d1, s2), false);
minitest.expect(dart.equals(d1, i1), false);
minitest.expect(dart.equals(d1, i2), false);
minitest.expect(dart.equals(d1, l1), false);
minitest.expect(dart.equals(d1, b1), false);
- minitest.expect(dart.equals(s1, d1), false);
- minitest.expect(dart.equals(s2, d1), false);
- minitest.expect(dart.equals(i1, d1), false);
- minitest.expect(dart.equals(i2, d1), false);
- minitest.expect(dart.equals(l1, d1), false);
- minitest.expect(dart.equals(b1, d1), false);
+ minitest.expect(s1 === d1, false);
+ minitest.expect(s2 === d1, false);
+ minitest.expect(i1 === d1, false);
+ minitest.expect(i2 === d1, false);
+ minitest.expect(l1[dartx['==']](d1), false);
+ minitest.expect(b1['=='](d1), false);
}, VoidToNull()));
}, VoidToNull()));
minitest.group('String equality', dart.fn(() => {
@@ -566,11 +566,11 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let o1 = equality_test.hideNull(core.Object)("The");
let o2 = equality_test.hideNull(core.Object)("Band");
minitest.expect(e1 == e1, true);
- minitest.expect(dart.equals(e1, d1), true);
- minitest.expect(dart.equals(e1, o1), true);
+ minitest.expect(core.identical(e1, d1), true);
+ minitest.expect(core.identical(e1, o1), true);
minitest.expect(e1 == e2, false);
- minitest.expect(dart.equals(e1, o2), false);
- minitest.expect(dart.equals(e1, d2), false);
+ minitest.expect(core.identical(e1, o2), false);
+ minitest.expect(core.identical(e1, d2), false);
minitest.expect(e1 == e2, false);
minitest.expect(dart.equals(d1, e1), true);
minitest.expect(dart.equals(d1, d1), true);
@@ -592,13 +592,13 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let d2 = "Band";
let o1 = "The";
let o2 = "Band";
- minitest.expect(e1 == e1, true);
- minitest.expect(dart.equals(e1, d1), true);
- minitest.expect(dart.equals(e1, o1), true);
- minitest.expect(e1 == e2, false);
- minitest.expect(dart.equals(e1, o2), false);
- minitest.expect(dart.equals(e1, d2), false);
- minitest.expect(e1 == e2, false);
+ minitest.expect(e1 === e1, true);
+ minitest.expect(e1 === d1, true);
+ minitest.expect(e1 === o1, true);
+ minitest.expect(e1 === e2, false);
+ minitest.expect(e1 === o2, false);
+ minitest.expect(e1 === d2, false);
+ minitest.expect(e1 === e2, false);
minitest.expect(dart.equals(d1, e1), true);
minitest.expect(dart.equals(d1, d1), true);
minitest.expect(dart.equals(d1, o1), true);
@@ -622,14 +622,14 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let b1 = equality_test.hideNull(equality_test.BluesBrother)(new equality_test._Norman.new());
minitest.expect(e1 == s1, false);
minitest.expect(e1 == s2, false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
+ minitest.expect(core.identical(e1, i1), false);
+ minitest.expect(core.identical(e1, i2), false);
+ minitest.expect(core.identical(e1, l1), false);
+ minitest.expect(core.identical(e1, b1), false);
minitest.expect(s1 == e1, false);
minitest.expect(s2 == e1, false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
+ minitest.expect(core.identical(i1, e1), false);
+ minitest.expect(core.identical(i2, e1), false);
minitest.expect(dart.equals(l1, e1), false);
minitest.expect(dart.equals(b1, e1), false);
}, VoidToNull()));
@@ -641,18 +641,18 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(e1 == s1, false);
- minitest.expect(e1 == s2, false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(s1 == e1, false);
- minitest.expect(s2 == e1, false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1 === s1, false);
+ minitest.expect(e1 === s2, false);
+ minitest.expect(e1 === i1, false);
+ minitest.expect(e1 === i2, false);
+ minitest.expect(e1 === l1, false);
+ minitest.expect(e1 === b1, false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
}, VoidToNull()));
minitest.test('Equal string/other (dynamic, nullable)', dart.fn(() => {
let e1 = equality_test.hideNull(core.String)("The");
@@ -663,12 +663,12 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = equality_test.hideNull(core.int)(0);
let l1 = equality_test.hideNull(core.List)(core.List.new(3));
let b1 = equality_test.hideNull(equality_test._Norman)(new equality_test._Norman.new());
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
+ minitest.expect(core.identical(e1, s1), false);
+ minitest.expect(core.identical(e1, s2), false);
+ minitest.expect(core.identical(e1, i1), false);
+ minitest.expect(core.identical(e1, i2), false);
+ minitest.expect(core.identical(e1, l1), false);
+ minitest.expect(core.identical(e1, b1), false);
minitest.expect(dart.equals(s1, e1), false);
minitest.expect(dart.equals(s2, e1), false);
minitest.expect(dart.equals(i1, e1), false);
@@ -697,30 +697,30 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(e1 == s1, false);
- minitest.expect(e1 == s2, false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(s1 == e1, false);
- minitest.expect(s2 == e1, false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1 === s1, false);
+ minitest.expect(e1 === s2, false);
+ minitest.expect(e1 === i1, false);
+ minitest.expect(e1 === i2, false);
+ minitest.expect(e1 === l1, false);
+ minitest.expect(e1 === b1, false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
minitest.expect(dart.equals(d1, s1), false);
minitest.expect(dart.equals(d1, s2), false);
minitest.expect(dart.equals(d1, i1), false);
minitest.expect(dart.equals(d1, i2), false);
minitest.expect(dart.equals(d1, l1), false);
minitest.expect(dart.equals(d1, b1), false);
- minitest.expect(dart.equals(s1, d1), false);
- minitest.expect(dart.equals(s2, d1), false);
- minitest.expect(dart.equals(i1, d1), false);
- minitest.expect(dart.equals(i2, d1), false);
- minitest.expect(dart.equals(l1, d1), false);
- minitest.expect(dart.equals(b1, d1), false);
+ minitest.expect(s1 === d1, false);
+ minitest.expect(s2 === d1, false);
+ minitest.expect(i1 === d1, false);
+ minitest.expect(i2 === d1, false);
+ minitest.expect(l1[dartx['==']](d1), false);
+ minitest.expect(b1['=='](d1), false);
}, VoidToNull()));
}, VoidToNull()));
minitest.group('Number equality', dart.fn(() => {
@@ -732,11 +732,11 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let o1 = equality_test.hideNull(core.Object)(11);
let o2 = equality_test.hideNull(core.Object)(12);
minitest.expect(e1 == e1, true);
- minitest.expect(dart.equals(e1, d1), true);
- minitest.expect(dart.equals(e1, o1), true);
+ minitest.expect(core.identical(e1, d1), true);
+ minitest.expect(core.identical(e1, o1), true);
minitest.expect(e1 == e2, false);
- minitest.expect(dart.equals(e1, o2), false);
- minitest.expect(dart.equals(e1, d2), false);
+ minitest.expect(core.identical(e1, o2), false);
+ minitest.expect(core.identical(e1, d2), false);
minitest.expect(e1 == e2, false);
minitest.expect(dart.equals(d1, e1), true);
minitest.expect(dart.equals(d1, d1), true);
@@ -758,13 +758,13 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let d2 = 12;
let o1 = 11;
let o2 = 12;
- minitest.expect(e1 == e1, true);
- minitest.expect(dart.equals(e1, d1), true);
- minitest.expect(dart.equals(e1, o1), true);
- minitest.expect(e1 == e2, false);
- minitest.expect(dart.equals(e1, o2), false);
- minitest.expect(dart.equals(e1, d2), false);
- minitest.expect(e1 == e2, false);
+ minitest.expect(e1 === e1, true);
+ minitest.expect(e1 === d1, true);
+ minitest.expect(e1 === o1, true);
+ minitest.expect(e1 === e2, false);
+ minitest.expect(e1 === o2, false);
+ minitest.expect(e1 === d2, false);
+ minitest.expect(e1 === e2, false);
minitest.expect(dart.equals(d1, e1), true);
minitest.expect(dart.equals(d1, d1), true);
minitest.expect(dart.equals(d1, o1), true);
@@ -786,14 +786,14 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = equality_test.hideNull(core.int)(0);
let l1 = equality_test.hideNull(core.List)(core.List.new(3));
let b1 = equality_test.hideNull(equality_test.BluesBrother)(new equality_test._Norman.new());
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
+ minitest.expect(core.identical(e1, s1), false);
+ minitest.expect(core.identical(e1, s2), false);
minitest.expect(e1 == i1, false);
minitest.expect(e1 == i2, false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
+ minitest.expect(core.identical(e1, l1), false);
+ minitest.expect(core.identical(e1, b1), false);
+ minitest.expect(core.identical(s1, e1), false);
+ minitest.expect(core.identical(s2, e1), false);
minitest.expect(i1 == e1, false);
minitest.expect(i2 == e1, false);
minitest.expect(dart.equals(l1, e1), false);
@@ -807,18 +807,18 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(e1 == i1, false);
- minitest.expect(e1 == i2, false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
- minitest.expect(i1 == e1, false);
- minitest.expect(i2 == e1, false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1 === s1, false);
+ minitest.expect(e1 === s2, false);
+ minitest.expect(e1 === i1, false);
+ minitest.expect(e1 === i2, false);
+ minitest.expect(e1 === l1, false);
+ minitest.expect(e1 === b1, false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
}, VoidToNull()));
minitest.test('Equal int/other (dynamic, nullable)', dart.fn(() => {
let e1 = equality_test.hideNull(core.int)(11);
@@ -829,12 +829,12 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = equality_test.hideNull(core.int)(0);
let l1 = equality_test.hideNull(core.List)(core.List.new(3));
let b1 = equality_test.hideNull(equality_test._Norman)(new equality_test._Norman.new());
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
+ minitest.expect(core.identical(e1, s1), false);
+ minitest.expect(core.identical(e1, s2), false);
+ minitest.expect(core.identical(e1, i1), false);
+ minitest.expect(core.identical(e1, i2), false);
+ minitest.expect(core.identical(e1, l1), false);
+ minitest.expect(core.identical(e1, b1), false);
minitest.expect(dart.equals(s1, e1), false);
minitest.expect(dart.equals(s2, e1), false);
minitest.expect(dart.equals(i1, e1), false);
@@ -863,30 +863,30 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(e1 == i1, false);
- minitest.expect(e1 == i2, false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
- minitest.expect(i1 == e1, false);
- minitest.expect(i2 == e1, false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1 === s1, false);
+ minitest.expect(e1 === s2, false);
+ minitest.expect(e1 === i1, false);
+ minitest.expect(e1 === i2, false);
+ minitest.expect(e1 === l1, false);
+ minitest.expect(e1 === b1, false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
minitest.expect(dart.equals(d1, s1), false);
minitest.expect(dart.equals(d1, s2), false);
minitest.expect(dart.equals(d1, i1), false);
minitest.expect(dart.equals(d1, i2), false);
minitest.expect(dart.equals(d1, l1), false);
minitest.expect(dart.equals(d1, b1), false);
- minitest.expect(dart.equals(s1, d1), false);
- minitest.expect(dart.equals(s2, d1), false);
- minitest.expect(dart.equals(i1, d1), false);
- minitest.expect(dart.equals(i2, d1), false);
- minitest.expect(dart.equals(l1, d1), false);
- minitest.expect(dart.equals(b1, d1), false);
+ minitest.expect(s1 === d1, false);
+ minitest.expect(s2 === d1, false);
+ minitest.expect(i1 === d1, false);
+ minitest.expect(i2 === d1, false);
+ minitest.expect(l1[dartx['==']](d1), false);
+ minitest.expect(b1['=='](d1), false);
}, VoidToNull()));
}, VoidToNull()));
minitest.group('Object equality', dart.fn(() => {
@@ -924,13 +924,13 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let d2 = new equality_test._Elwood.new();
let o1 = e1;
let o2 = new equality_test._Elwood.new();
- minitest.expect(dart.equals(e1, e1), true);
- minitest.expect(dart.equals(e1, d1), true);
- minitest.expect(dart.equals(e1, o1), true);
- minitest.expect(dart.equals(e1, e2), false);
- minitest.expect(dart.equals(e1, o2), false);
- minitest.expect(dart.equals(e1, d2), false);
- minitest.expect(dart.equals(e1, e2), false);
+ minitest.expect(e1['=='](e1), true);
+ minitest.expect(e1['=='](d1), true);
+ minitest.expect(e1['=='](o1), true);
+ minitest.expect(e1['=='](e2), false);
+ minitest.expect(e1['=='](o2), false);
+ minitest.expect(e1['=='](d2), false);
+ minitest.expect(e1['=='](e2), false);
minitest.expect(dart.equals(d1, e1), true);
minitest.expect(dart.equals(d1, d1), true);
minitest.expect(dart.equals(d1, o1), true);
@@ -958,10 +958,10 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
minitest.expect(dart.equals(e1, i2), false);
minitest.expect(dart.equals(e1, l1), false);
minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
+ minitest.expect(core.identical(s1, e1), false);
+ minitest.expect(core.identical(s2, e1), false);
+ minitest.expect(core.identical(i1, e1), false);
+ minitest.expect(core.identical(i2, e1), false);
minitest.expect(dart.equals(l1, e1), false);
minitest.expect(dart.equals(b1, e1), false);
}, VoidToNull()));
@@ -973,18 +973,18 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1['=='](s1), false);
+ minitest.expect(e1['=='](s2), false);
+ minitest.expect(e1['=='](i1), false);
+ minitest.expect(e1['=='](i2), false);
+ minitest.expect(e1['=='](l1), false);
+ minitest.expect(e1['=='](b1), false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
}, VoidToNull()));
minitest.test('Equal object/other (dynamic, nullable)', dart.fn(() => {
let e1 = equality_test.hideNull(equality_test._Jake)(new equality_test._Jake.new());
@@ -1029,30 +1029,30 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let i2 = 0;
let l1 = core.List.new(3);
let b1 = new equality_test._Norman.new();
- minitest.expect(dart.equals(e1, s1), false);
- minitest.expect(dart.equals(e1, s2), false);
- minitest.expect(dart.equals(e1, i1), false);
- minitest.expect(dart.equals(e1, i2), false);
- minitest.expect(dart.equals(e1, l1), false);
- minitest.expect(dart.equals(e1, b1), false);
- minitest.expect(dart.equals(s1, e1), false);
- minitest.expect(dart.equals(s2, e1), false);
- minitest.expect(dart.equals(i1, e1), false);
- minitest.expect(dart.equals(i2, e1), false);
- minitest.expect(dart.equals(l1, e1), false);
- minitest.expect(dart.equals(b1, e1), false);
+ minitest.expect(e1['=='](s1), false);
+ minitest.expect(e1['=='](s2), false);
+ minitest.expect(e1['=='](i1), false);
+ minitest.expect(e1['=='](i2), false);
+ minitest.expect(e1['=='](l1), false);
+ minitest.expect(e1['=='](b1), false);
+ minitest.expect(s1 === e1, false);
+ minitest.expect(s2 === e1, false);
+ minitest.expect(i1 === e1, false);
+ minitest.expect(i2 === e1, false);
+ minitest.expect(l1[dartx['==']](e1), false);
+ minitest.expect(b1['=='](e1), false);
minitest.expect(dart.equals(d1, s1), false);
minitest.expect(dart.equals(d1, s2), false);
minitest.expect(dart.equals(d1, i1), false);
minitest.expect(dart.equals(d1, i2), false);
minitest.expect(dart.equals(d1, l1), false);
minitest.expect(dart.equals(d1, b1), false);
- minitest.expect(dart.equals(s1, d1), false);
- minitest.expect(dart.equals(s2, d1), false);
- minitest.expect(dart.equals(i1, d1), false);
- minitest.expect(dart.equals(i2, d1), false);
- minitest.expect(dart.equals(l1, d1), false);
- minitest.expect(dart.equals(b1, d1), false);
+ minitest.expect(s1 === d1, false);
+ minitest.expect(s2 === d1, false);
+ minitest.expect(i1 === d1, false);
+ minitest.expect(i2 === d1, false);
+ minitest.expect(l1[dartx['==']](d1), false);
+ minitest.expect(b1['=='](d1), false);
}, VoidToNull()));
}, VoidToNull()));
minitest.group('Null/undefined equality', dart.fn(() => {
@@ -1067,9 +1067,9 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
minitest.expect(dart.equals(n, u2), true);
minitest.expect(dart.equals(n, u3), true);
minitest.expect(dart.equals(n, u4), true);
- minitest.expect(dart.equals(u1, n), true);
- minitest.expect(dart.equals(u2, n), true);
- minitest.expect(dart.equals(u3, n), true);
+ minitest.expect(core.identical(u1, n), true);
+ minitest.expect(core.identical(u2, n), true);
+ minitest.expect(core.identical(u3, n), true);
minitest.expect(dart.equals(u4, n), true);
}, VoidToNull()));
minitest.test('Equal String/other (static, null)', dart.fn(() => {
@@ -1079,13 +1079,13 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let u3 = equality_test.getUndefined(core.bool)();
let u4 = equality_test.getUndefined(core.List)();
minitest.expect(n == n, true);
- minitest.expect(dart.equals(n, u1), true);
- minitest.expect(dart.equals(n, u2), true);
- minitest.expect(dart.equals(n, u3), true);
- minitest.expect(dart.equals(n, u4), true);
+ minitest.expect(core.identical(n, u1), true);
+ minitest.expect(core.identical(n, u2), true);
+ minitest.expect(core.identical(n, u3), true);
+ minitest.expect(core.identical(n, u4), true);
minitest.expect(dart.equals(u1, n), true);
- minitest.expect(dart.equals(u2, n), true);
- minitest.expect(dart.equals(u3, n), true);
+ minitest.expect(core.identical(u2, n), true);
+ minitest.expect(core.identical(u3, n), true);
minitest.expect(dart.equals(u4, n), true);
}, VoidToNull()));
minitest.test('Equal int/other (static, null)', dart.fn(() => {
@@ -1095,13 +1095,13 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let u3 = equality_test.getUndefined(core.bool)();
let u4 = equality_test.getUndefined(core.List)();
minitest.expect(n == n, true);
- minitest.expect(dart.equals(n, u1), true);
- minitest.expect(dart.equals(n, u2), true);
- minitest.expect(dart.equals(n, u3), true);
- minitest.expect(dart.equals(n, u4), true);
+ minitest.expect(core.identical(n, u1), true);
+ minitest.expect(core.identical(n, u2), true);
+ minitest.expect(core.identical(n, u3), true);
+ minitest.expect(core.identical(n, u4), true);
minitest.expect(dart.equals(u1, n), true);
- minitest.expect(dart.equals(u2, n), true);
- minitest.expect(dart.equals(u3, n), true);
+ minitest.expect(core.identical(u2, n), true);
+ minitest.expect(core.identical(u3, n), true);
minitest.expect(dart.equals(u4, n), true);
}, VoidToNull()));
minitest.test('Equal bool/other (static, null)', dart.fn(() => {
@@ -1111,13 +1111,13 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
let n = equality_test.hideNull(core.bool)(null);
let u4 = equality_test.getUndefined(core.List)();
minitest.expect(n == n, true);
- minitest.expect(dart.equals(n, u1), true);
- minitest.expect(dart.equals(n, u2), true);
- minitest.expect(dart.equals(n, u3), true);
- minitest.expect(dart.equals(n, u4), true);
+ minitest.expect(core.identical(n, u1), true);
+ minitest.expect(core.identical(n, u2), true);
+ minitest.expect(core.identical(n, u3), true);
+ minitest.expect(core.identical(n, u4), true);
minitest.expect(dart.equals(u1, n), true);
- minitest.expect(dart.equals(u2, n), true);
- minitest.expect(dart.equals(u3, n), true);
+ minitest.expect(core.identical(u2, n), true);
+ minitest.expect(core.identical(u3, n), true);
minitest.expect(dart.equals(u4, n), true);
}, VoidToNull()));
minitest.test('Equal List/other (static, null)', dart.fn(() => {
@@ -1132,9 +1132,9 @@ define(['dart_sdk', 'expect'], function(dart_sdk, expect) {
minitest.expect(dart.equals(n, u3), true);
minitest.expect(dart.equals(n, u4), true);
minitest.expect(dart.equals(u1, n), true);
- minitest.expect(dart.equals(u2, n), true);
- minitest.expect(dart.equals(u3, n), true);
- minitest.expect(dart.equals(u4, n), true);
+ minitest.expect(core.identical(u2, n), true);
+ minitest.expect(core.identical(u3, n), true);
+ minitest.expect(core.identical(u4, n), true);
}, VoidToNull()));
}, VoidToNull()));
};
« no previous file with comments | « pkg/dev_compiler/test/codegen_expected/async_helper.js ('k') | pkg/dev_compiler/test/codegen_expected/identity_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698