mirror of https://github.com/tc39/test262.git
Add cases to RegExp.prototype flags brand checking tests
For completeness, as we are doing in newer brand checking tests such as those of Temporal, call these getters with a function object and a bigint as the receiver. Suggested in https://github.com/tc39/test262/pull/3614/files#r929662337
This commit is contained in:
parent
9e51a9d855
commit
d45766bef3
|
@ -28,3 +28,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
dotAll.call(arguments);
|
||||
}, 'arguments object');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
dotAll.call(() => {});
|
||||
}, 'function object');
|
||||
|
|
|
@ -38,3 +38,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
dotAll.call(4);
|
||||
}, "number");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
dotAll.call(4n);
|
||||
}, "bigint");
|
||||
|
|
|
@ -35,3 +35,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
get.call(Symbol());
|
||||
}, 'symbol');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
get.call(4n);
|
||||
}, 'bigint');
|
||||
|
|
|
@ -24,3 +24,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
get.call(arguments);
|
||||
}, 'arguments object');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
get.call(() => {});
|
||||
}, 'function object');
|
||||
|
|
|
@ -35,3 +35,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
get.call(symbol);
|
||||
}, 'symbol');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
get.call(4n);
|
||||
}, 'bigint');
|
||||
|
|
|
@ -28,3 +28,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
hasIndices.call(arguments);
|
||||
}, 'arguments object');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
hasIndices.call(() => {});
|
||||
}, 'function object');
|
||||
|
|
|
@ -38,3 +38,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
hasIndices.call(4);
|
||||
}, "number");
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
hasIndices.call(4n);
|
||||
}, "bigint");
|
||||
|
|
|
@ -24,3 +24,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
get.call(arguments);
|
||||
}, 'arguments object');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
get.call(() => {});
|
||||
}, 'function object');
|
||||
|
|
|
@ -35,3 +35,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
get.call(symbol);
|
||||
}, 'symbol');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
get.call(4n);
|
||||
}, 'bigint');
|
||||
|
|
|
@ -24,3 +24,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
get.call(arguments);
|
||||
}, 'arguments object');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
get.call(() => {});
|
||||
}, 'function object');
|
||||
|
|
|
@ -35,3 +35,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
get.call(symbol);
|
||||
}, 'symbol');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
get.call(4n);
|
||||
}, 'bigint');
|
||||
|
|
|
@ -24,3 +24,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
get.call(arguments);
|
||||
}, 'arguments object');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
get.call(() => {});
|
||||
}, 'function object');
|
||||
|
|
|
@ -35,3 +35,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
get.call(symbol);
|
||||
}, 'symbol');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
get.call(4n);
|
||||
}, 'bigint');
|
||||
|
|
|
@ -26,3 +26,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
sticky.call(arguments);
|
||||
}, 'arguments object');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
sticky.call(() => {});
|
||||
}, 'function object');
|
||||
|
|
|
@ -38,3 +38,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
sticky.call(4);
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
sticky.call(4n);
|
||||
}, 'bigint');
|
||||
|
|
|
@ -26,3 +26,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
unicode.call(arguments);
|
||||
}, 'arguments object');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
unicode.call(() => {});
|
||||
}, 'function object');
|
||||
|
|
|
@ -38,3 +38,7 @@ assert.throws(TypeError, function() {
|
|||
assert.throws(TypeError, function() {
|
||||
unicode.call(4);
|
||||
});
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
unicode.call(4n);
|
||||
}, 'bigint');
|
||||
|
|
Loading…
Reference in New Issue