diff --git a/harness/sm/non262-Math-shell.js b/harness/sm/non262-Math-shell.js index d0b5dff226..6d467c90f3 100644 --- a/harness/sm/non262-Math-shell.js +++ b/harness/sm/non262-Math-shell.js @@ -50,10 +50,10 @@ const ONE_MINUS_EPSILON = 1 - Math.pow(2, -53); // 1.0000000000000002 ENDIAN = 0; // try little-endian first if (diff(2, 4) === 0x100000) // exact wrong answer we'll get on a big-endian platform ENDIAN = 1; - assertEq(diff(2,4), 0x10000000000000); - assertEq(diff(0, Number.MIN_VALUE), 1); - assertEq(diff(1, ONE_PLUS_EPSILON), 1); - assertEq(diff(1, ONE_MINUS_EPSILON), 1); + assert.sameValue(diff(2,4), 0x10000000000000); + assert.sameValue(diff(0, Number.MIN_VALUE), 1); + assert.sameValue(diff(1, ONE_PLUS_EPSILON), 1); + assert.sameValue(diff(1, ONE_MINUS_EPSILON), 1); var assertNear = function assertNear(a, b, tolerance=1) { if (!Number.isFinite(b)) { diff --git a/harness/sm/non262-Set-shell.js b/harness/sm/non262-Set-shell.js index 365c629760..448e7d336d 100644 --- a/harness/sm/non262-Set-shell.js +++ b/harness/sm/non262-Set-shell.js @@ -17,10 +17,10 @@ defines: [assertSetContainsExactOrderedItems, SetLike, SetIteratorLike, LoggingP const SetIteratorPrototypeNext = new Set().values().next; function assertSetContainsExactOrderedItems(actual, expected) { - assertEq(ReflectGetPrototypeOf(actual), SetPrototype, "actual is a native Set object"); - assertEq(ArrayIsArray(expected), true, "expected is an Array object"); + assert.sameValue(ReflectGetPrototypeOf(actual), SetPrototype, "actual is a native Set object"); + assert.sameValue(ArrayIsArray(expected), true, "expected is an Array object"); - assertEq(ReflectApply(SetPrototypeSize, actual, []), expected.length); + assert.sameValue(ReflectApply(SetPrototypeSize, actual, []), expected.length); let index = 0; let keys = ReflectApply(SetPrototypeKeys, actual, []); @@ -30,7 +30,7 @@ defines: [assertSetContainsExactOrderedItems, SetLike, SetIteratorLike, LoggingP if (done) { break; } - assertEq(item, expected[index], `Element at index ${index}:`); + assert.sameValue(item, expected[index], `Element at index ${index}:`); index++; } } @@ -81,7 +81,7 @@ defines: [assertSetContainsExactOrderedItems, SetLike, SetIteratorLike, LoggingP } function LoggingProxy(obj, log) { - assertEq(ArrayIsArray(log), true); + assert.sameValue(ArrayIsArray(log), true); let handler = new Proxy({ get(t, pk, r) { diff --git a/harness/sm/non262-Temporal-PlainMonthDay-shell.js b/harness/sm/non262-Temporal-PlainMonthDay-shell.js index eb83d404c6..1ffbf3a54a 100644 --- a/harness/sm/non262-Temporal-PlainMonthDay-shell.js +++ b/harness/sm/non262-Temporal-PlainMonthDay-shell.js @@ -7,7 +7,7 @@ function ISOFields(monthDay) { let str = monthDay.toString({calendarName: "always"}); let match = str.match(re); - assertEq(match !== null, true, `can't match: ${str}`); + assert.sameValue(match !== null, true, `can't match: ${str}`); let {year, month, day, calendar} = match.groups; let isoYear = Number(year); @@ -17,10 +17,10 @@ function ISOFields(monthDay) { let date = Temporal.PlainDate.from(str); let isoDate = date.withCalendar("iso8601"); - assertEq(calendar, date.calendarId); - assertEq(isoYear, isoDate.year); - assertEq(isoMonth, isoDate.month); - assertEq(isoDay, isoDate.day); + assert.sameValue(calendar, date.calendarId); + assert.sameValue(isoYear, isoDate.year); + assert.sameValue(isoMonth, isoDate.month); + assert.sameValue(isoDay, isoDate.day); return { isoYear, @@ -34,15 +34,15 @@ function assertSameISOFields(actual, expected) { let actualFields = ISOFields(actual); let expectedFields = ISOFields(expected); - assertEq(typeof actualFields.isoYear, "number"); - assertEq(typeof actualFields.isoMonth, "number"); - assertEq(typeof actualFields.isoDay, "number"); + assert.sameValue(typeof actualFields.isoYear, "number"); + assert.sameValue(typeof actualFields.isoMonth, "number"); + assert.sameValue(typeof actualFields.isoDay, "number"); - assertEq(actualFields.isoMonth > 0, true); - assertEq(actualFields.isoDay > 0, true); + assert.sameValue(actualFields.isoMonth > 0, true); + assert.sameValue(actualFields.isoDay > 0, true); - assertEq(actualFields.isoYear, expectedFields.isoYear); - assertEq(actualFields.isoMonth, expectedFields.isoMonth); - assertEq(actualFields.isoDay, expectedFields.isoDay); - assertEq(actualFields.calendar, expectedFields.calendar); + assert.sameValue(actualFields.isoYear, expectedFields.isoYear); + assert.sameValue(actualFields.isoMonth, expectedFields.isoMonth); + assert.sameValue(actualFields.isoDay, expectedFields.isoDay); + assert.sameValue(actualFields.calendar, expectedFields.calendar); } diff --git a/harness/sm/non262-TypedArray-shell.js b/harness/sm/non262-TypedArray-shell.js index 5fe532f0f4..409b718552 100644 --- a/harness/sm/non262-TypedArray-shell.js +++ b/harness/sm/non262-TypedArray-shell.js @@ -7,7 +7,6 @@ allow_unused: True const { Float16Array, Float32Array, Float64Array, Object, Reflect, SharedArrayBuffer, WeakMap, - assertEq } = global; const { apply: Reflect_apply, @@ -37,7 +36,7 @@ allow_unused: True new.target); for (var i = 0; i < length; i++) sharedArray[i] = array[i]; - assertEq(sharedArray.buffer, sharedBuffer); + assert.sameValue(sharedArray.buffer, sharedBuffer); return sharedArray; } }