Skip to content

Commit

Permalink
Final tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pzuraq committed Jun 6, 2024
1 parent 813e2af commit f72b125
Show file tree
Hide file tree
Showing 100 changed files with 1,060 additions and 94 deletions.
2 changes: 1 addition & 1 deletion src/decorator/accessor-deco-invalid-return-get.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoelementdefinition
desc: Accessor decorator cannot return invalid getter
template: accessors/error/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/accessor-deco-invalid-return-init.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoelementdefinition
desc: Accessor decorator cannot return invalid init
template: accessors/error/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/accessor-deco-invalid-return-set.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoelementdefinition
desc: Accessor decorator cannot return invalid setter
template: accessors/error/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/accessor-deco-invalid-return.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoelementdefinition
desc: Accessor decorator cannot return invalid init
template: accessors/error/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/accessor-deco-returns-get.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoelementdefinition
desc: Accessor decorator can return a new getter
template: accessors/standard/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/accessor-deco-returns-init.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoelementdefinition
desc: Accessor decorator can return a new init
template: accessors/standard/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/accessor-deco-returns-set.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoelementdefinition
desc: Accessor decorator can return a new getter
template: accessors/standard/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/accessor-with-init-deco-returns-get.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoelementdefinition
desc: Accessor decorator can return a new getter
template: accessors/with-init/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/accessor-with-init-deco-returns-init.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoelementdefinition
desc: Accessor decorator can return a new init that chains with default initializer
template: accessors/with-init/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/accessor-with-init-deco-returns-set.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoelementdefinition
desc: Accessor decorator can return a new setter when initializer is present
template: accessors/with-init/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class-deco-invalid-return-arrow.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoclassdefinition
desc: Class decorator cannot return non-newable function (arrow)
template: class/error
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class-deco-invalid-return-primitive.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-initializefieldoraccessor
esid: sec-applydecoratorstoclassdefinition
desc: Class decorator cannot return a random non-newable value
template: class/error
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class-deco-rebinds-identifier.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoclassdefinition
desc: Class decorator return value is rebound before static fields are run
template: class/standard/cls-decl.template
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class-deco-returns-class.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoclassdefinition
desc: Class decorator can return a new class
template: class/standard
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class-deco-returns-function.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoclassdefinition
desc: Class decorator can return a standard function
template: class/standard
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class-deco-returns-proxy.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoclassdefinition
desc: Class decorator can return a Proxy
template: class/standard
features: [decorators, Proxy]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class-deco-returns-subclass.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoclassdefinition
desc: Class decorator can return a new class
template: class/standard
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class/error/cls-decl.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
path: language/statements/class/decorator/class/error/
name: class decorator evaluation error in class declaration
features: [class, decorators]
esid: prod-MethodDefinition
esid: prod-ClassDeclaration
---*/

/*{ decorators }*/
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class/error/cls-expr.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
path: language/expressions/class/decorator/class/error/
name: private method decorator evaluation error in class expression
features: [class, decorators, class-methods-private]
esid: prod-MethodDefinition
esid: prod-ClassExpression
---*/

/*{ decorators }*/
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class/standard/cls-decl.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
path: language/statements/class/decorator/class/
name: decorator usage in a class declaration
features: [class]
esid: prod-FieldDefinition
esid: prod-ClassDeclaration
---*/

/*{ decorators }*/
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class/standard/cls-expr.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
path: language/expressions/class/decorator/class/
name: decorator usage in a class expression
features: [class]
esid: prod-FieldDefinition
esid: prod-FieldExpression
---*/

/*{ decorators }*/
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class/with-super-class/cls-decl.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
path: language/statements/class/decorator/class/with-super-class/
name: decorator usage in a class declaration
features: [class]
esid: prod-FieldDefinition
esid: prod-ClassDeclaration
---*/

/*{ decorators }*/
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/class/with-super-class/cls-expr.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
path: language/expressions/class/decorator/class/with-super-class/
name: decorator usage in a class expression
features: [class]
esid: prod-FieldDefinition
esid: prod-ClassExpression
---*/

/*{ decorators }*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-runtime-semantics-classdefinitionevaluation
esid: sec-ecmascript-function-objects-construct-argumentslist-newtarget
desc: Order of decorator application for elements with initializers
templates:
- accessors/with-init/**/*
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/decorator-order-phases-4-init-instance.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-runtime-semantics-classdefinitionevaluation
esid: sec-ecmascript-function-objects-construct-argumentslist-newtarget
desc: Class instance creation order
info: |
Class instances are created in the following order:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@
/*---
esid: sec-initializefieldoraccessor
desc: Field initializer `this` value is the instance or the class
template: fields/with-init/**/*
templates:
- fields/standard/**/*
- fields/with-init/**/*
- accessors/standard/**/*
- accessors/with-init/**/*
features: [decorators]
---*/

//- decorators
var savedThisValues = [];

function dec(value) {
return function(value) {
function dec(value, context) {
function init (value) {
savedThisValues.push(this);
}

return context.kind === 'field' ? init : { init };
}

//- application
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/getter-deco-returns-invalid.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Decorator can't return an invalid value
template: getters/error/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/getter-deco-returns-replacement.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Can replace a decorated getter with a new getter
template: getters/standard/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/getter-deco-returns-undefined.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Decorator undefined return defaults to previous value
template: getters/standard/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/method-async-deco-returns-replacement.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Can replace a decorated method with a new method
template: methods/async/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/method-async-deco-returns-undefined.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Decorator undefined return defaults to previous value
template: methods/async/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/method-deco-returns-invalid.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Decorator can't return an invalid value
template: methods/error/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/method-deco-returns-replacement.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Can replace a decorated method with a new method
template: methods/standard/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/method-deco-returns-undefined.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Decorator undefined return defaults to previous value
template: methods/standard/**/*
features: [decorators]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Can replace a decorated method with a new method
template: methods/generator/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/method-generator-deco-returns-undefined.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Decorator undefined return defaults to previous value
template: methods/generator/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/setter-deco-returns-invalid.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Decorator can't return an invalid value
template: setters/error/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/setter-deco-returns-replacement.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Can replace a decorated setter with a new setter
template: setters/standard/**/*
features: [decorators]
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/setter-deco-returns-undefined.case
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdecoratorcontextobject
esid: sec-applydecoratorstoelementdefinition
desc: Decorator undefined return defaults to previous value
template: setters/standard/**/*
features: [decorators]
Expand Down
Loading

0 comments on commit f72b125

Please sign in to comment.