diff options
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | quickjs.c | 72 | ||||
-rw-r--r-- | run-test262.c | 9 | ||||
-rw-r--r-- | test262.conf | 15 | ||||
-rw-r--r-- | test262_errors.txt | 40 | ||||
-rw-r--r-- | tests/test262.patch | 13 |
6 files changed, 86 insertions, 65 deletions
@@ -62,6 +62,6 @@ Optimization ideas: Test262o: 0/11262 errors, 463 excluded Test262o commit: 7da91bceb9ce7613f87db47ddd1292a2dda58b42 (es5-tests branch) -Result: 104/78189 errors, 1599 excluded, 7236 skipped +Result: 70/78178 errors, 1610 excluded, 7236 skipped Test262 commit: 56e77d6325067a545ea7e8ff5be5d9284334e33c @@ -33822,6 +33822,12 @@ static __exception int js_parse_directives(JSParseState *s) return js_parse_seek_token(s, &pos); } +/* return TRUE if the keyword is forbidden only in strict mode */ +static BOOL is_strict_future_keyword(JSAtom atom) +{ + return (atom >= JS_ATOM_LAST_KEYWORD + 1 && atom <= JS_ATOM_LAST_STRICT_KEYWORD); +} + static int js_parse_function_check_names(JSParseState *s, JSFunctionDef *fd, JSAtom func_name) { @@ -33832,13 +33838,15 @@ static int js_parse_function_check_names(JSParseState *s, JSFunctionDef *fd, if (!fd->has_simple_parameter_list && fd->has_use_strict) { return js_parse_error(s, "\"use strict\" not allowed in function with default or destructuring parameter"); } - if (func_name == JS_ATOM_eval || func_name == JS_ATOM_arguments) { + if (func_name == JS_ATOM_eval || func_name == JS_ATOM_arguments || + is_strict_future_keyword(func_name)) { return js_parse_error(s, "invalid function name in strict code"); } for (idx = 0; idx < fd->arg_count; idx++) { name = fd->args[idx].var_name; - if (name == JS_ATOM_eval || name == JS_ATOM_arguments) { + if (name == JS_ATOM_eval || name == JS_ATOM_arguments || + is_strict_future_keyword(name)) { return js_parse_error(s, "invalid argument name in strict code"); } } @@ -34118,6 +34126,8 @@ static __exception int js_parse_function_decl2(JSParseState *s, int idx, has_initializer; if (s->token.val == TOK_ELLIPSIS) { + if (func_type == JS_PARSE_FUNC_SETTER) + goto fail_accessor; fd->has_simple_parameter_list = FALSE; rest = TRUE; if (next_token(s)) @@ -34231,6 +34241,7 @@ static __exception int js_parse_function_decl2(JSParseState *s, } if ((func_type == JS_PARSE_FUNC_GETTER && fd->arg_count != 0) || (func_type == JS_PARSE_FUNC_SETTER && fd->arg_count != 1)) { + fail_accessor: js_parse_error(s, "invalid number of arguments for getter or setter"); goto fail; } @@ -37301,6 +37312,7 @@ static __exception int JS_ObjectDefineProperties(JSContext *ctx, if (JS_IsException(props)) return -1; p = JS_VALUE_GET_OBJ(props); + /* XXX: not done in the same order as the spec */ if (JS_GetOwnPropertyNamesInternal(ctx, &atoms, &len, p, JS_GPN_ENUM_ONLY | JS_GPN_STRING_MASK | JS_GPN_SYMBOL_MASK) < 0) goto exception; for(i = 0; i < len; i++) { @@ -38257,17 +38269,17 @@ exception: static JSValue js_object_propertyIsEnumerable(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { - JSValue obj, res = JS_EXCEPTION; - JSAtom prop = JS_ATOM_NULL; + JSValue obj = JS_UNDEFINED, res = JS_EXCEPTION; + JSAtom prop; JSPropertyDescriptor desc; int has_prop; - obj = JS_ToObject(ctx, this_val); - if (JS_IsException(obj)) - goto exception; prop = JS_ValueToAtom(ctx, argv[0]); if (unlikely(prop == JS_ATOM_NULL)) goto exception; + obj = JS_ToObject(ctx, this_val); + if (JS_IsException(obj)) + goto exception; has_prop = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(obj), prop); if (has_prop < 0) @@ -44097,12 +44109,6 @@ static JSValue js_regexp_exec(JSContext *ctx, JSValueConst this_val, goto fail; } - t = groups, groups = JS_UNDEFINED; - if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_groups, - t, prop_flags) < 0) { - goto fail; - } - t = JS_NewInt32(ctx, (capture[0] - str_buf) >> shift); if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_index, t, prop_flags) < 0) goto fail; @@ -44111,6 +44117,12 @@ static JSValue js_regexp_exec(JSContext *ctx, JSValueConst this_val, if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_input, t, prop_flags) < 0) goto fail; + t = groups, groups = JS_UNDEFINED; + if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_groups, + t, prop_flags) < 0) { + goto fail; + } + if (!JS_IsUndefined(indices)) { t = indices_groups, indices_groups = JS_UNDEFINED; if (JS_DefinePropertyValue(ctx, indices, JS_ATOM_groups, @@ -44945,7 +44957,7 @@ static JSValue js_regexp_Symbol_split(JSContext *ctx, JSValueConst this_val, if (js_get_length64(ctx, &numberOfCaptures, z)) goto exception; for(i = 1; i < numberOfCaptures; i++) { - sub = JS_ToStringFree(ctx, JS_GetPropertyInt64(ctx, z, i)); + sub = JS_GetPropertyInt64(ctx, z, i); if (JS_IsException(sub)) goto exception; if (JS_DefinePropertyValueInt64(ctx, A, lengthA++, sub, JS_PROP_C_W_E | JS_PROP_THROW) < 0) @@ -51255,9 +51267,10 @@ void JS_AddIntrinsicBaseObjects(JSContext *ctx) countof(js_generator_proto_funcs)); ctx->class_proto[JS_CLASS_GENERATOR_FUNCTION] = JS_NewObjectProto(ctx, ctx->function_proto); - obj1 = JS_NewCFunctionMagic(ctx, js_function_constructor, - "GeneratorFunction", 1, - JS_CFUNC_constructor_or_func_magic, JS_FUNC_GENERATOR); + obj1 = JS_NewCFunction3(ctx, (JSCFunction *)js_function_constructor, + "GeneratorFunction", 1, + JS_CFUNC_constructor_or_func_magic, JS_FUNC_GENERATOR, + ctx->function_ctor); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_GENERATOR_FUNCTION], js_generator_function_proto_funcs, @@ -51909,6 +51922,8 @@ static JSValue js_typed_array_with(JSContext *ctx, JSValueConst this_val, p = get_typed_array(ctx, this_val, /*is_dataview*/0); if (!p) return JS_EXCEPTION; + if (typed_array_is_detached(ctx, p)) + return JS_ThrowTypeErrorDetachedArrayBuffer(ctx); if (JS_ToInt64Sat(ctx, &idx, argv[0])) return JS_EXCEPTION; @@ -51916,13 +51931,14 @@ static JSValue js_typed_array_with(JSContext *ctx, JSValueConst this_val, len = p->u.array.count; if (idx < 0) idx = len + idx; - if (idx < 0 || idx >= len) - return JS_ThrowRangeError(ctx, "invalid array index"); val = JS_ToPrimitive(ctx, argv[1], HINT_NUMBER); if (JS_IsException(val)) return JS_EXCEPTION; + if (typed_array_is_detached(ctx, p) || idx < 0 || idx >= len) + return JS_ThrowRangeError(ctx, "invalid array index"); + arr = js_typed_array_constructor_ta(ctx, JS_UNDEFINED, this_val, p->class_id); if (JS_IsException(arr)) { @@ -52731,6 +52747,18 @@ static JSValue js_typed_array_toReversed(JSContext *ctx, JSValueConst this_val, return ret; } +static void slice_memcpy(uint8_t *dst, const uint8_t *src, size_t len) +{ + if (dst + len <= src || dst >= src + len) { + /* no overlap: can use memcpy */ + memcpy(dst, src, len); + } else { + /* otherwise the spec mandates byte copy */ + while (len-- != 0) + *dst++ = *src++; + } +} + static JSValue js_typed_array_slice(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { @@ -52773,9 +52801,9 @@ static JSValue js_typed_array_slice(JSContext *ctx, JSValueConst this_val, if (p1 != NULL && p->class_id == p1->class_id && typed_array_get_length(ctx, p1) >= count && typed_array_get_length(ctx, p) >= start + count) { - memcpy(p1->u.array.u.uint8_ptr, - p->u.array.u.uint8_ptr + (start << shift), - count << shift); + slice_memcpy(p1->u.array.u.uint8_ptr, + p->u.array.u.uint8_ptr + (start << shift), + count << shift); } else { for (n = 0; n < count; n++) { val = JS_GetPropertyValue(ctx, this_val, JS_NewInt32(ctx, start + n)); diff --git a/run-test262.c b/run-test262.c index a42b9b5..4397a1d 100644 --- a/run-test262.c +++ b/run-test262.c @@ -757,6 +757,13 @@ static JSValue js_IsHTMLDDA(JSContext *ctx, JSValue this_val, return JS_NULL; } +static JSValue js_gc(JSContext *ctx, JSValueConst this_val, + int argc, JSValueConst *argv) +{ + JS_RunGC(JS_GetRuntime(ctx)); + return JS_UNDEFINED; +} + static JSValue add_helpers1(JSContext *ctx) { JSValue global_obj; @@ -790,6 +797,8 @@ static JSValue add_helpers1(JSContext *ctx) obj = JS_NewCFunction(ctx, js_IsHTMLDDA, "IsHTMLDDA", 0); JS_SetIsHTMLDDA(ctx, obj); JS_SetPropertyStr(ctx, obj262, "IsHTMLDDA", obj); + JS_SetPropertyStr(ctx, obj262, "gc", + JS_NewCFunction(ctx, js_gc, "gc", 0)); JS_SetPropertyStr(ctx, global_obj, "$262", JS_DupValue(ctx, obj262)); diff --git a/test262.conf b/test262.conf index 2df16ae..1feddcf 100644 --- a/test262.conf +++ b/test262.conf @@ -335,22 +335,31 @@ test262/test/staging/sm/Array/frozen-dense-array.js test262/test/staging/sm/Set/difference.js test262/test/staging/sm/Set/intersection.js test262/test/staging/sm/Set/is-disjoint-from.js -test262/test/staging/sm/Set/is-subset-of.js:34 -test262/test/staging/sm/Set/is-superset-of.js:34 +test262/test/staging/sm/Set/is-subset-of.js +test262/test/staging/sm/Set/is-superset-of.js test262/test/staging/sm/Set/symmetric-difference.js -test262/test/staging/sm/Set/union.js:34 +test262/test/staging/sm/Set/union.js test262/test/staging/sm/extensions/censor-strict-caller.js test262/test/staging/sm/JSON/parse-with-source.js +test262/test/staging/sm/RegExp/flags.js +test262/test/staging/sm/RegExp/prototype.js # no f16 test262/test/staging/sm/Math/f16round.js test262/test/staging/sm/TypedArray/sort_small.js test262/test/staging/sm/extensions/dataview.js +test262/test/staging/sm/TypedArray/toString.js # not standard test262/test/staging/sm/Function/builtin-no-construct.js test262/test/staging/sm/Function/function-caller-restrictions.js test262/test/staging/sm/Function/function-toString-builtin-name.js +test262/test/staging/sm/extensions/arguments-property-access-in-function.js +test262/test/staging/sm/extensions/function-caller-skips-eval-frames.js +test262/test/staging/sm/extensions/function-properties.js +# RegExp toSource not fully compliant +test262/test/staging/sm/RegExp/toString.js +test262/test/staging/sm/RegExp/source.js [tests] # list test files or use config.testdir diff --git a/test262_errors.txt b/test262_errors.txt index e079476..206e03f 100644 --- a/test262_errors.txt +++ b/test262_errors.txt @@ -17,34 +17,21 @@ test262/test/staging/sm/JSON/parse-syntax-errors-02.js:51: Test262Error: parsing test262/test/staging/sm/Math/cbrt-approx.js:26: Error: got 1.39561242508609, expected a number near 1.3956124250860895 (relative error: 2) test262/test/staging/sm/RegExp/constructor-ordering-2.js:15: Test262Error: Expected SameValue(«false», «true») to be true test262/test/staging/sm/RegExp/escape.js:13: Test262Error: Expected SameValue(«"\\\n"», «"\\n"») to be true -test262/test/staging/sm/RegExp/flags.js:28: Test262Error: Expected SameValue(«"dgimsuy"», «"dgimsuvy"») to be true test262/test/staging/sm/RegExp/match-trace.js:13: Test262Error: Expected SameValue(«"get:flags,get:unicode,set:lastIndex,get:exec,call:exec,get:result[0],get:exec,call:exec,get:result[0],get:exec,call:exec,"», «"get:flags,set:lastIndex,get:exec,call:exec,get:result[0],get:exec,call:exec,get:result[0],get:exec,call:exec,"») to be true -test262/test/staging/sm/RegExp/prototype.js:42: Test262Error: Actual [Symbol(Symbol.match), Symbol(Symbol.matchAll), Symbol(Symbol.replace), Symbol(Symbol.search), Symbol(Symbol.split), compile, constructor, dotAll, exec, flags, global, hasIndices, ignoreCase, multiline, source, sticky, test, toString, unicode] and expected [Symbol(Symbol.match), Symbol(Symbol.matchAll), Symbol(Symbol.replace), Symbol(Symbol.search), Symbol(Symbol.split), compile, constructor, dotAll, exec, flags, global, hasIndices, ignoreCase, multiline, source, sticky, test, toString, unicode, unicodeSets] should have the same contents. test262/test/staging/sm/RegExp/regress-613820-1.js:13: Test262Error: Expected SameValue(«"aaa"», «"aa"») to be true test262/test/staging/sm/RegExp/regress-613820-2.js:13: Test262Error: Expected SameValue(«"f"», «undefined») to be true test262/test/staging/sm/RegExp/regress-613820-3.js:13: Test262Error: Expected SameValue(«"aab"», «"aa"») to be true test262/test/staging/sm/RegExp/replace-trace.js:13: Test262Error: Expected SameValue(«"get:flags,get:unicode,set:lastIndex,get:exec,call:exec,get:result[0],get:exec,call:exec,get:result[length],get:result[0],get:result[index],get:result[groups],"», «"get:flags,set:lastIndex,get:exec,call:exec,get:result[0],get:exec,call:exec,get:result[length],get:result[0],get:result[index],get:result[groups],"») to be true -test262/test/staging/sm/RegExp/source.js:29: Test262Error: Expected SameValue(«"
"», «"\\u2028\\u2029"») to be true -test262/test/staging/sm/RegExp/toString.js:31: Test262Error: Expected SameValue(«"/
/"», «"/\\u2028\\u2029/"») to be true test262/test/staging/sm/RegExp/unicode-ignoreCase-escape.js:22: Test262Error: Actual argument shouldn't be nullish. test262/test/staging/sm/RegExp/unicode-ignoreCase-word-boundary.js:13: Test262Error: Expected SameValue(«false», «true») to be true -test262/test/staging/sm/Set/is-subset-of.js:34: Test262Error: Expected SameValue(«"undefined"», «"function"») to be true -test262/test/staging/sm/Set/is-superset-of.js:34: Test262Error: Expected SameValue(«"undefined"», «"function"») to be true -test262/test/staging/sm/Set/union.js:34: Test262Error: Expected SameValue(«"undefined"», «"function"») to be true test262/test/staging/sm/String/match-defines-match-elements.js:52: Test262Error: Expected SameValue(«true», «false») to be true -test262/test/staging/sm/String/split-01.js:20: Test262Error: Expected SameValue(«"undefined"», «undefined») to be true -test262/test/staging/sm/String/split-xregexp.js:43: Test262Error: '.'.split(/(.)?(.)?/) Expected SameValue(«"undefined"», «undefined») to be true test262/test/staging/sm/TypedArray/constructor-buffer-sequence.js:73: Error: Assertion failed: expected exception ExpectedError, got Error: Poisoned Value test262/test/staging/sm/TypedArray/prototype-constructor-identity.js:17: Test262Error: Expected SameValue(«2», «6») to be true test262/test/staging/sm/TypedArray/set-detached-bigint.js:27: Error: Assertion failed: expected exception SyntaxError, got RangeError: invalid array length test262/test/staging/sm/TypedArray/set-detached.js:112: RangeError: invalid array length -test262/test/staging/sm/TypedArray/slice-memcpy.js:16: Test262Error: Actual [1, 2, 1, 2, 3, 4] and expected [1, 2, 1, 2, 1, 2] should have the same contents. test262/test/staging/sm/TypedArray/sort-negative-nan.js:102: TypeError: cannot read property 'name' of undefined test262/test/staging/sm/TypedArray/sort_modifications.js:12: Test262Error: Int8Array at index 0 for size 4 Expected SameValue(«0», «1») to be true test262/test/staging/sm/TypedArray/subarray.js:15: Test262Error: Expected SameValue(«0», «1») to be true -test262/test/staging/sm/TypedArray/toString.js:61: ReferenceError: 'Float16Array' is not defined -test262/test/staging/sm/TypedArray/with-detached.js:17: Error: Assertion failed: expected exception TypeError, got RangeError: invalid array index -test262/test/staging/sm/TypedArray/with.js:27: Error: Assertion failed: expected exception Err, got RangeError: invalid array index test262/test/staging/sm/async-functions/async-contains-unicode-escape.js:45: Error: Assertion failed: expected exception SyntaxError, no exception thrown test262/test/staging/sm/async-functions/await-error.js:12: Test262Error: Expected SameValue(«false», «true») to be true test262/test/staging/sm/async-functions/await-in-arrow-parameters.js:33: Error: Assertion failed: expected exception SyntaxError, no exception thrown - AsyncFunction:(a = (b = await/r/g) => {}) => {} @@ -57,21 +44,8 @@ test262/test/staging/sm/expressions/optional-chain.js:25: Error: Assertion faile test262/test/staging/sm/expressions/short-circuit-compound-assignment-const.js:97: TypeError: 'a' is read-only test262/test/staging/sm/expressions/short-circuit-compound-assignment-tdz.js:23: Error: Assertion failed: expected exception ReferenceError, got TypeError: 'a' is read-only test262/test/staging/sm/extensions/TypedArray-set-object-funky-length-detaches.js:55: RangeError: invalid array length -test262/test/staging/sm/extensions/arguments-property-access-in-function.js:31: TypeError: cannot read property of undefined -test262/test/staging/sm/extensions/function-caller-skips-eval-frames.js:41: Test262Error: Expected SameValue(«undefined», «function nest() { return eval("innermost();"); }») to be true -test262/test/staging/sm/extensions/function-properties.js:28: Test262Error: Expected SameValue(«undefined», «null») to be true -test262/test/staging/sm/extensions/recursion.js:54: TypeError: not a function test262/test/staging/sm/extensions/regress-469625-01.js:16: Test262Error: TM: Array prototype and expression closures Expected SameValue(«"TypeError: [].__proto__ is not a function"», «"TypeError: not a function"») to be true -test262/test/staging/sm/extensions/regress-650753.js:16: TypeError: not a function -test262/test/staging/sm/extensions/typedarray-set-detach.js:43: TypeError: not a function -test262/test/staging/sm/extensions/weakmap.js:97: TypeError: not a function -test262/test/staging/sm/generators/gen-with-call-obj.js:40: TypeError: not a function -test262/test/staging/sm/generators/runtime.js:35: Test262Error: Expected SameValue(«function Function() { - [native code] -}», «function () { - [native code] -}») to be true -test262/test/staging/sm/generators/syntax.js:30: Error: Assertion failed: expected SyntaxError, but no exception thrown - function* yield() { 'use strict'; (yield 3) + (yield 4); } +test262/test/staging/sm/generators/syntax.js:30: Error: Assertion failed: expected SyntaxError, but no exception thrown - function* g() { (function* yield() {}); } test262/test/staging/sm/lexical-environment/block-scoped-functions-annex-b-arguments.js:14: Test262Error: Expected SameValue(«"object"», «"function"») to be true test262/test/staging/sm/lexical-environment/block-scoped-functions-annex-b-eval.js:12: Test262Error: Expected SameValue(«"outer-gouter-geval-gtruefalseq"», «"outer-geval-gwith-gtruefalseq"») to be true test262/test/staging/sm/lexical-environment/block-scoped-functions-annex-b-if.js:20: TypeError: not a function @@ -79,17 +53,9 @@ test262/test/staging/sm/lexical-environment/block-scoped-functions-annex-b-notap test262/test/staging/sm/lexical-environment/block-scoped-functions-deprecated-redecl.js:23: Test262Error: Expected SameValue(«3», «4») to be true test262/test/staging/sm/lexical-environment/unscopables-proto.js:15: Test262Error: Expected SameValue(«true», «false») to be true test262/test/staging/sm/lexical-environment/var-in-catch-body-annex-b-eval.js:17: Test262Error: Expected SameValue(«"g"», «"global-x"») to be true -test262/test/staging/sm/misc/future-reserved-words.js:21: Test262Error: Implement FutureReservedWords per-spec: implements: function argument retroactively strict Expected SameValue(«"no error"», «"SyntaxError"») to be true -test262/test/staging/sm/misc/new-with-non-constructor.js:14: Test262Error: Expected SameValue(«false», «true») to be true test262/test/staging/sm/module/module-export-name-star.js:15: SyntaxError: identifier expected -test262/test/staging/sm/object/15.2.3.14-01.js:30: Test262Error: 0,groups,index,input Expected SameValue(«false», «true») to be true -test262/test/staging/sm/object/accessor-arguments-rest.js:18: Error: Assertion failed: expected exception SyntaxError, no exception thrown -test262/test/staging/sm/object/clear-dictionary-accessor-getset.js:52: TypeError: not a function test262/test/staging/sm/object/defineProperties-order.js:14: Test262Error: Expected SameValue(«"ownKeys,getOwnPropertyDescriptor,getOwnPropertyDescriptor,get,get"», «"ownKeys,getOwnPropertyDescriptor,get,getOwnPropertyDescriptor,get"») to be true test262/test/staging/sm/object/defineProperty-proxy.js:32: Test262Error: Expected ["has configurable", "get configurable", "has writable", "get writable", "has enumerable", "get enumerable", "has value", "get value", "has get", "has set"] to be structurally equal to ["has enumerable", "get enumerable", "has configurable", "get configurable", "has value", "get value", "has writable", "get writable", "has get", "has set"]. -test262/test/staging/sm/object/entries.js:62: Test262Error: Expected [["0", "a"], ["groups", undefined], ["index", 0], ["input", "abc"]] to be structurally equal to [["0", "a"], ["index", 0], ["input", "abc"], ["groups", undefined]]. -test262/test/staging/sm/object/propertyIsEnumerable.js:14: Test262Error: didn't throw ReferenceError, got: TypeError: cannot convert to object Expected SameValue(«false», «true») to be true -test262/test/staging/sm/object/values.js:62: Test262Error: Actual [a, undefined, 0, abc] and expected [a, 0, abc, undefined] should have the same contents. test262/test/staging/sm/regress/regress-577648-1.js:21: Test262Error: 1 Expected SameValue(«true», «false») to be true test262/test/staging/sm/regress/regress-577648-2.js:14: Test262Error: Expected SameValue(«true», «false») to be true test262/test/staging/sm/regress/regress-584355.js:12: Test262Error: Expected SameValue(«"function f () { ff (); }"», «"undefined"») to be true @@ -97,14 +63,10 @@ test262/test/staging/sm/regress/regress-586482-1.js:19: Test262Error: ok Expecte test262/test/staging/sm/regress/regress-586482-2.js:19: Test262Error: ok Expected SameValue(«true», «false») to be true test262/test/staging/sm/regress/regress-586482-3.js:18: Test262Error: ok Expected SameValue(«true», «false») to be true test262/test/staging/sm/regress/regress-586482-4.js:14: Test262Error: ok Expected SameValue(«function() { this.f(); }», «undefined») to be true -test262/test/staging/sm/regress/regress-592556-c35.js:26: TypeError: not a function -test262/test/staging/sm/regress/regress-596103.js:17: TypeError: not a function test262/test/staging/sm/regress/regress-602621.js:14: Test262Error: function sub-statement must override arguments Expected SameValue(«"function"», «"object"») to be true test262/test/staging/sm/regress/regress-699682.js:15: Test262Error: Expected SameValue(«false», «true») to be true test262/test/staging/sm/regress/regress-1383630.js:30: Error: Assertion failed: expected exception TypeError, no exception thrown -test262/test/staging/sm/regress/regress-1507322-deep-weakmap.js:17: TypeError: not a function test262/test/staging/sm/statements/arrow-function-in-for-statement-head.js:15: Test262Error: expected syntax error, got Error: didn't throw Expected SameValue(«false», «true») to be true -test262/test/staging/sm/statements/for-in-with-gc-and-unvisited-deletion.js:37: TypeError: not a function test262/test/staging/sm/statements/regress-642975.js:14: Test262Error: Expected SameValue(«undefined», «"y"») to be true test262/test/staging/sm/statements/try-completion.js:17: Test262Error: Expected SameValue(«"try"», «undefined») to be true test262/test/staging/sm/syntax/syntax-parsed-arrow-then-directive.js:77: Test262Error: stack should contain 'http://example.com/foo.js': block, semi Expected SameValue(«false», «true») to be true diff --git a/tests/test262.patch b/tests/test262.patch index 3047751..b6f4aa5 100644 --- a/tests/test262.patch +++ b/tests/test262.patch @@ -90,3 +90,16 @@ index c1829e3..3a3ee27 100644 -} \ No newline at end of file +} +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); + } + } |