Skip to content

Commit 84f8202

Browse files
committed
harness: Remove hidden-constructors harness file
The objects it provides are also available in another harness file, wellKnownIntrinsicObjects.js. There's no point in duplicating that in the harness. Rewrite each test that used hidden-constructors.js to use getWellKnownIntrinsicObject instead.
1 parent 2af27af commit 84f8202

File tree

5 files changed

+8
-34
lines changed

5 files changed

+8
-34
lines changed

harness/hidden-constructors.js

-27
This file was deleted.

test/built-ins/AsyncFunction/is-a-constructor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ info: |
1515
If Type(argument) is not Object, return false.
1616
If argument has a [[Construct]] internal method, return true.
1717
Return false.
18-
includes: [isConstructor.js, hidden-constructors.js]
18+
includes: [isConstructor.js, wellKnownIntrinsicObjects.js]
1919
features: [Reflect.construct]
2020
---*/
2121

22+
var AsyncFunction = getWellKnownIntrinsicObject('%AsyncFunction%');
2223
assert.sameValue(isConstructor(AsyncFunction), true, 'isConstructor(AsyncFunction) must return true');
2324
new AsyncFunction();
24-

test/built-ins/AsyncGeneratorFunction/is-a-constructor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ info: |
1515
If Type(argument) is not Object, return false.
1616
If argument has a [[Construct]] internal method, return true.
1717
Return false.
18-
includes: [isConstructor.js, hidden-constructors.js]
18+
includes: [isConstructor.js, wellKnownIntrinsicObjects.js]
1919
features: [Reflect.construct]
2020
---*/
2121

22+
var AsyncGeneratorFunction = getWellKnownIntrinsicObject('%AsyncGeneratorFunction%');
2223
assert.sameValue(
2324
isConstructor(AsyncGeneratorFunction),
2425
true,
2526
'isConstructor(AsyncGeneratorFunction) must return true'
2627
);
2728
new AsyncGeneratorFunction();
28-

test/built-ins/GeneratorFunction/is-a-constructor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ info: |
1515
If Type(argument) is not Object, return false.
1616
If argument has a [[Construct]] internal method, return true.
1717
Return false.
18-
includes: [isConstructor.js, hidden-constructors.js]
18+
includes: [isConstructor.js, wellKnownIntrinsicObjects.js]
1919
features: [Reflect.construct]
2020
---*/
2121

22+
var GeneratorFunction = getWellKnownIntrinsicObject('%GeneratorFunction%');
2223
assert.sameValue(isConstructor(GeneratorFunction), true, 'isConstructor(GeneratorFunction) must return true');
2324
new GeneratorFunction();
24-

test/language/expressions/async-arrow-function/prototype.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ info: |
1111
6. Let closure be OrdinaryFunctionCreate(%AsyncFunction.prototype%, sourceText, parameters,
1212
AsyncConciseBody, lexical-this, env, privateEnv).
1313
...
14-
includes: [hidden-constructors.js]
14+
includes: [wellKnownIntrinsicObjects.js]
1515
---*/
1616

17+
var AsyncFunction = getWellKnownIntrinsicObject('%AsyncFunction%');
1718
assert.sameValue(Object.getPrototypeOf(async () => {}), AsyncFunction.prototype);

0 commit comments

Comments
 (0)