Enable strict mode testing for rest of sm/extensions

This commit is contained in:
André Bargull 2025-04-30 14:16:28 +02:00 committed by Philip Chimento
parent f72b5123d9
commit a724191c3f
3 changed files with 11 additions and 17 deletions

View File

@ -4,8 +4,6 @@
*/ */
/*--- /*---
flags:
- noStrict
description: | description: |
DataView tests DataView tests
esid: pending esid: pending
@ -33,7 +31,7 @@ function test(sharedMem) {
} }
// testConstructor // testConstructor
buffer = bufferize(new Uint8Array([1, 2])); var buffer = bufferize(new Uint8Array([1, 2]));
checkThrow(() => new DataView(buffer, 0, 3), RangeError); checkThrow(() => new DataView(buffer, 0, 3), RangeError);
checkThrow(() => new DataView(buffer, 1, 2), RangeError); checkThrow(() => new DataView(buffer, 1, 2), RangeError);
checkThrow(() => new DataView(buffer, 2, 1), RangeError); checkThrow(() => new DataView(buffer, 2, 1), RangeError);
@ -49,7 +47,7 @@ function test(sharedMem) {
var data1_r = data1.slice().reverse(); var data1_r = data1.slice().reverse();
var buffer1 = bufferize(new Uint8Array(data1)); var buffer1 = bufferize(new Uint8Array(data1));
var view1 = new DataView(buffer1, 0, 16); var view1 = new DataView(buffer1, 0, 16);
view = view1; var view = view1;
assert.sameValue(view.getInt8(0), 0); assert.sameValue(view.getInt8(0), 0);
assert.sameValue(view.getInt8(8), -128); assert.sameValue(view.getInt8(8), -128);
assert.sameValue(view.getInt8(15), -1); assert.sameValue(view.getInt8(15), -1);

View File

@ -4,8 +4,6 @@
*/ */
/*--- /*---
flags:
- noStrict
description: | description: |
Do not assert: pobj_ == obj2 Do not assert: pobj_ == obj2
esid: pending esid: pending
@ -20,10 +18,10 @@ function test()
{ {
expect = '12'; expect = '12';
a = {x: 1}; var a = {x: 1};
b = {__proto__: a}; var b = {__proto__: a};
c = {__proto__: b}; var c = {__proto__: b};
for (i = 0; i < 2; i++) { for (var i = 0; i < 2; i++) {
actual += c.x; actual += c.x;
b.x = 2; b.x = 2;
} }

View File

@ -4,8 +4,6 @@
*/ */
/*--- /*---
flags:
- noStrict
description: | description: |
pobj_ == obj2 pobj_ == obj2
esid: pending esid: pending
@ -20,12 +18,12 @@ function test()
{ {
expect = '1111222'; expect = '1111222';
a = {x: 1}; var a = {x: 1};
b = {__proto__: a}; var b = {__proto__: a};
c = {__proto__: b}; var c = {__proto__: b};
objs = [{__proto__: a}, {__proto__: a}, {__proto__: a}, b, {__proto__: a}, var objs = [{__proto__: a}, {__proto__: a}, {__proto__: a}, b, {__proto__: a},
{__proto__: a}]; {__proto__: a}];
for (i = 0; i < 6; i++) { for (var i = 0; i < 6; i++) {
actual += ""+c.x; actual += ""+c.x;
objs[i].x = 2; objs[i].x = 2;
} }