mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Delete tests/test262.patch
We don't use it.
This commit is contained in:
parent
12940d7877
commit
9bb8a68390
2 changed files with 4 additions and 98 deletions
|
@ -193,30 +193,15 @@ QuickJS archive.
|
||||||
|
|
||||||
@section Test262 (ECMAScript Test Suite)
|
@section Test262 (ECMAScript Test Suite)
|
||||||
|
|
||||||
A test262 runner is included in the QuickJS archive. The test262 tests
|
A test262 runner is included in the QuickJS archive.
|
||||||
can be installed in the QuickJS source directory with:
|
|
||||||
|
The tests can be run with:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
git clone https://github.com/tc39/test262.git test262
|
make test262
|
||||||
cd test262
|
|
||||||
patch -p1 < ../tests/test262.patch
|
|
||||||
cd ..
|
|
||||||
@end example
|
|
||||||
|
|
||||||
The patch adds the implementation specific @code{harness} functions
|
|
||||||
and optimizes the inefficient RegExp character classes and Unicode
|
|
||||||
property escapes tests (the tests themselves are not modified, only a
|
|
||||||
slow string initialization function is optimized).
|
|
||||||
|
|
||||||
The tests can be run with
|
|
||||||
@example
|
|
||||||
make test2
|
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The configuration files @code{test262.conf}
|
The configuration files @code{test262.conf}
|
||||||
(resp. @code{test262o.conf} for the old ES5.1 tests@footnote{The old
|
|
||||||
ES5.1 tests can be extracted with @code{git clone --single-branch
|
|
||||||
--branch es5-tests https://github.com/tc39/test262.git test262o}}))
|
|
||||||
contain the options to run the various tests. Tests can be excluded
|
contain the options to run the various tests. Tests can be excluded
|
||||||
based on features or filename.
|
based on features or filename.
|
||||||
|
|
||||||
|
@ -265,14 +250,6 @@ The following features are not supported yet:
|
||||||
|
|
||||||
ECMA402 (Internationalization API) is not supported.
|
ECMA402 (Internationalization API) is not supported.
|
||||||
|
|
||||||
@subsection Extensions
|
|
||||||
|
|
||||||
@itemize
|
|
||||||
|
|
||||||
@item The first line of a script beginning with @code{#!} is ignored.
|
|
||||||
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
@section Modules
|
@section Modules
|
||||||
|
|
||||||
ES6 modules are fully supported. The default name resolution is the
|
ES6 modules are fully supported. The default name resolution is the
|
||||||
|
|
|
@ -1,71 +0,0 @@
|
||||||
diff --git a/harness/atomicsHelper.js b/harness/atomicsHelper.js
|
|
||||||
index 9c1217351e..3c24755558 100644
|
|
||||||
--- a/harness/atomicsHelper.js
|
|
||||||
+++ b/harness/atomicsHelper.js
|
|
||||||
@@ -227,10 +227,14 @@ $262.agent.waitUntil = function(typedArray, index, expected) {
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
$262.agent.timeouts = {
|
|
||||||
- yield: 100,
|
|
||||||
- small: 200,
|
|
||||||
- long: 1000,
|
|
||||||
- huge: 10000,
|
|
||||||
+// yield: 100,
|
|
||||||
+// small: 200,
|
|
||||||
+// long: 1000,
|
|
||||||
+// huge: 10000,
|
|
||||||
+ yield: 20,
|
|
||||||
+ small: 20,
|
|
||||||
+ long: 100,
|
|
||||||
+ huge: 1000,
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
diff --git a/harness/regExpUtils.js b/harness/regExpUtils.js
|
|
||||||
index be7039fda0..7b38abf8df 100644
|
|
||||||
--- a/harness/regExpUtils.js
|
|
||||||
+++ b/harness/regExpUtils.js
|
|
||||||
@@ -6,24 +6,27 @@ description: |
|
|
||||||
defines: [buildString, testPropertyEscapes, matchValidator]
|
|
||||||
---*/
|
|
||||||
|
|
||||||
+if ($262 && typeof $262.codePointRange === "function") {
|
|
||||||
+ /* use C function to build the codePointRange (much faster with
|
|
||||||
+ slow JS engines) */
|
|
||||||
+ codePointRange = $262.codePointRange;
|
|
||||||
+} else {
|
|
||||||
+ codePointRange = function codePointRange(start, end) {
|
|
||||||
+ const codePoints = [];
|
|
||||||
+ let length = 0;
|
|
||||||
+ for (codePoint = start; codePoint < end; codePoint++) {
|
|
||||||
+ codePoints[length++] = codePoint;
|
|
||||||
+ }
|
|
||||||
+ return String.fromCodePoint.apply(null, codePoints);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
function buildString({ loneCodePoints, ranges }) {
|
|
||||||
- const CHUNK_SIZE = 10000;
|
|
||||||
- let result = Reflect.apply(String.fromCodePoint, null, loneCodePoints);
|
|
||||||
- for (let i = 0; i < ranges.length; i++) {
|
|
||||||
- const range = ranges[i];
|
|
||||||
- const start = range[0];
|
|
||||||
- const end = range[1];
|
|
||||||
- const codePoints = [];
|
|
||||||
- for (let length = 0, codePoint = start; codePoint <= end; codePoint++) {
|
|
||||||
- codePoints[length++] = codePoint;
|
|
||||||
- if (length === CHUNK_SIZE) {
|
|
||||||
- result += Reflect.apply(String.fromCodePoint, null, codePoints);
|
|
||||||
- codePoints.length = length = 0;
|
|
||||||
- }
|
|
||||||
+ let result = String.fromCodePoint.apply(null, loneCodePoints);
|
|
||||||
+ for (const [start, end] of ranges) {
|
|
||||||
+ result += codePointRange(start, end + 1);
|
|
||||||
}
|
|
||||||
- result += Reflect.apply(String.fromCodePoint, null, codePoints);
|
|
||||||
- }
|
|
||||||
- return result;
|
|
||||||
+ return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
function testPropertyEscapes(regex, string, expression) {
|
|
Loading…
Reference in a new issue