updated test262

This commit is contained in:
Fabrice Bellard
2025-10-03 11:55:50 +02:00
parent 4af5b1ea7e
commit 31663a930d
5 changed files with 66 additions and 99 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/harness/atomicsHelper.js b/harness/atomicsHelper.js
index 9828b15..4a5919d 100644
index 9828b15..9e24d64 100644
--- a/harness/atomicsHelper.js
+++ b/harness/atomicsHelper.js
@@ -272,10 +272,14 @@ $262.agent.waitUntil = function(typedArray, index, expected) {
@@ -70,66 +70,3 @@ index b397be0..c197ddc 100644
}
return result;
}
diff --git a/harness/sm/non262.js b/harness/sm/non262.js
index 89df923..79ded15 100644
--- a/harness/sm/non262.js
+++ b/harness/sm/non262.js
@@ -34,8 +34,6 @@ globalThis.createNewGlobal = function() {
return $262.createRealm().global
}
-function print(...args) {
-}
function assertEq(...args) {
assert.sameValue(...args)
}
diff --git a/test/staging/sm/extensions/regress-469625-01.js b/test/staging/sm/extensions/regress-469625-01.js
index 81f84fc..4652002 100644
--- a/test/staging/sm/extensions/regress-469625-01.js
+++ b/test/staging/sm/extensions/regress-469625-01.js
@@ -14,8 +14,7 @@ esid: pending
//-----------------------------------------------------------------------------
var BUGNUMBER = 469625;
var summary = 'TM: Array prototype and expression closures';
-var actual = '';
-var expect = '';
+var actual = null;
//-----------------------------------------------------------------------------
@@ -24,9 +23,6 @@ test();
function test()
{
- expect = 'TypeError: [].__proto__ is not a function';
-
-
Array.prototype.__proto__ = function () { return 3; };
try
@@ -35,8 +31,10 @@ function test()
}
catch(ex)
{
- print(actual = ex + '');
+ print(ex + '');
+ actual = ex;
}
- assert.sameValue(expect, actual, summary);
+ assert.sameValue(actual instanceof TypeError, true);
+ assert.sameValue(actual.message.includes("not a function"), true);
}
diff --git a/test/staging/sm/misc/new-with-non-constructor.js b/test/staging/sm/misc/new-with-non-constructor.js
index 18c2f0c..f9aa209 100644
--- a/test/staging/sm/misc/new-with-non-constructor.js
+++ b/test/staging/sm/misc/new-with-non-constructor.js
@@ -16,7 +16,7 @@ function checkConstruct(thing) {
new thing();
assert.sameValue(0, 1, "not reached " + thing);
} catch (e) {
- assert.sameValue(e.message.includes(" is not a constructor") ||
+ assert.sameValue(e.message.includes("not a constructor") ||
e.message === "Function.prototype.toString called on incompatible object", true);
}
}