mirror of https://github.com/tc39/test262.git
Generate tests
This commit is contained in:
parent
35e3f82504
commit
a9837df144
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-private-ctor-meth-valid.case
|
||||
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template
|
||||
/*---
|
||||
description: Static Methods can be named constructor (class expression)
|
||||
esid: prod-ClassElement
|
||||
features: [class]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype"
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
var C = class {
|
||||
static constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
};
|
|
@ -0,0 +1,30 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-ctor-accessor-meth-valid.case
|
||||
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Accessor Methods can be named constructor (class expression)
|
||||
esid: prod-ClassElement
|
||||
features: [class]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype".
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static get constructor() {}
|
||||
static set constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
};
|
||||
|
||||
assert(C.hasOwnProperty('constructor'));
|
||||
assert(C.prototype.hasOwnProperty('constructor'));
|
||||
assert.notSameValue(C.prototype.constructor, C.constructor);
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-ctor-async-gen-meth-valid.case
|
||||
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Async Generator Methods can be named constructor (class expression)
|
||||
esid: prod-ClassElement
|
||||
features: [async-iteration, class]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype".
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static async * constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
};
|
||||
|
||||
assert(C.hasOwnProperty('constructor'));
|
||||
assert(C.prototype.hasOwnProperty('constructor'));
|
||||
assert.notSameValue(C.prototype.constructor, C.constructor);
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-ctor-async-meth-valid.case
|
||||
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Methods can be named constructor (class expression)
|
||||
esid: prod-ClassElement
|
||||
features: [async-functions, class]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype".
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static async constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
};
|
||||
|
||||
assert(C.hasOwnProperty('constructor'));
|
||||
assert(C.prototype.hasOwnProperty('constructor'));
|
||||
assert.notSameValue(C.prototype.constructor, C.constructor);
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-ctor-gen-meth-valid.case
|
||||
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Generator Methods can be named constructor (class expression)
|
||||
esid: prod-ClassElement
|
||||
features: [generators, class]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype".
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static * constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
};
|
||||
|
||||
assert(C.hasOwnProperty('constructor'));
|
||||
assert(C.prototype.hasOwnProperty('constructor'));
|
||||
assert.notSameValue(C.prototype.constructor, C.constructor);
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-ctor-meth-valid.case
|
||||
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Methods can be named constructor (class expression)
|
||||
esid: prod-ClassElement
|
||||
features: [class]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype".
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
var C = class {
|
||||
static constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
};
|
||||
|
||||
assert(C.hasOwnProperty('constructor'));
|
||||
assert(C.prototype.hasOwnProperty('constructor'));
|
||||
assert.notSameValue(C.prototype.constructor, C.constructor);
|
|
@ -2,7 +2,7 @@
|
|||
// - src/class-elements/grammar-static-private-async-gen-meth-prototype.case
|
||||
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Async Generator Private Methods can be named prototype (class expression)
|
||||
description: Static Async Generator Private Methods can be named "#prototype" (class expression)
|
||||
esid: prod-ClassElement
|
||||
features: [async-iteration, class-static-methods-private, class]
|
||||
flags: [generated]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// - src/class-elements/grammar-static-private-async-meth-prototype.case
|
||||
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Async Private Methods can be named prototype (class expression)
|
||||
description: Static Async Private Methods can be named "#prototype" (class expression)
|
||||
esid: prod-ClassElement
|
||||
features: [async-functions, class-static-methods-private, class]
|
||||
flags: [generated]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// - src/class-elements/grammar-static-private-gen-meth-prototype.case
|
||||
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Generator Private Methods can be named prototype (class expression)
|
||||
description: Static Generator Private Methods can be named "#prototype" (class expression)
|
||||
esid: prod-ClassElement
|
||||
features: [generators, class-static-methods-private, class]
|
||||
flags: [generated]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// - src/class-elements/grammar-static-private-meth-prototype.case
|
||||
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Private Methods can be named prototype (class expression)
|
||||
description: Static Private Methods can be named "#prototype" (class expression)
|
||||
esid: prod-ClassElement
|
||||
features: [class-static-methods-private, class]
|
||||
flags: [generated]
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-private-ctor-meth-valid.case
|
||||
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
|
||||
/*---
|
||||
description: Static Methods can be named constructor (class declaration)
|
||||
esid: prod-ClassElement
|
||||
features: [class]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype"
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
class C {
|
||||
static constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-ctor-accessor-meth-valid.case
|
||||
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Accessor Methods can be named constructor (class declaration)
|
||||
esid: prod-ClassElement
|
||||
features: [class]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype".
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
class C {
|
||||
static get constructor() {}
|
||||
static set constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
}
|
||||
|
||||
assert(C.hasOwnProperty('constructor'));
|
||||
assert(C.prototype.hasOwnProperty('constructor'));
|
||||
assert.notSameValue(C.prototype.constructor, C.constructor);
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-ctor-async-gen-meth-valid.case
|
||||
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Async Generator Methods can be named constructor (class declaration)
|
||||
esid: prod-ClassElement
|
||||
features: [async-iteration, class]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype".
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
class C {
|
||||
static async * constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
}
|
||||
|
||||
assert(C.hasOwnProperty('constructor'));
|
||||
assert(C.prototype.hasOwnProperty('constructor'));
|
||||
assert.notSameValue(C.prototype.constructor, C.constructor);
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-ctor-async-meth-valid.case
|
||||
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Methods can be named constructor (class declaration)
|
||||
esid: prod-ClassElement
|
||||
features: [async-functions, class]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype".
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
class C {
|
||||
static async constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
}
|
||||
|
||||
assert(C.hasOwnProperty('constructor'));
|
||||
assert(C.prototype.hasOwnProperty('constructor'));
|
||||
assert.notSameValue(C.prototype.constructor, C.constructor);
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-ctor-gen-meth-valid.case
|
||||
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Generator Methods can be named constructor (class declaration)
|
||||
esid: prod-ClassElement
|
||||
features: [generators, class]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype".
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
class C {
|
||||
static * constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
}
|
||||
|
||||
assert(C.hasOwnProperty('constructor'));
|
||||
assert(C.prototype.hasOwnProperty('constructor'));
|
||||
assert.notSameValue(C.prototype.constructor, C.constructor);
|
|
@ -0,0 +1,29 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/class-elements/grammar-static-ctor-meth-valid.case
|
||||
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Methods can be named constructor (class declaration)
|
||||
esid: prod-ClassElement
|
||||
features: [class]
|
||||
flags: [generated]
|
||||
info: |
|
||||
Class Definitions / Static Semantics: Early Errors
|
||||
|
||||
ClassElement : MethodDefinition
|
||||
It is a Syntax Error if PropName of MethodDefinition is not "constructor" and HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "constructor" and SpecialMethod of MethodDefinition is true.
|
||||
ClassElement : static MethodDefinition
|
||||
It is a Syntax Error if HasDirectSuper of MethodDefinition is true.
|
||||
It is a Syntax Error if PropName of MethodDefinition is "prototype".
|
||||
|
||||
---*/
|
||||
|
||||
|
||||
class C {
|
||||
static constructor() {}
|
||||
constructor() {} // stacks with a valid constructor
|
||||
}
|
||||
|
||||
assert(C.hasOwnProperty('constructor'));
|
||||
assert(C.prototype.hasOwnProperty('constructor'));
|
||||
assert.notSameValue(C.prototype.constructor, C.constructor);
|
|
@ -2,7 +2,7 @@
|
|||
// - src/class-elements/grammar-static-private-async-gen-meth-prototype.case
|
||||
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Async Generator Private Methods can be named prototype (class declaration)
|
||||
description: Static Async Generator Private Methods can be named "#prototype" (class declaration)
|
||||
esid: prod-ClassElement
|
||||
features: [async-iteration, class-static-methods-private, class]
|
||||
flags: [generated]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// - src/class-elements/grammar-static-private-async-meth-prototype.case
|
||||
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Async Private Methods can be named prototype (class declaration)
|
||||
description: Static Async Private Methods can be named "#prototype" (class declaration)
|
||||
esid: prod-ClassElement
|
||||
features: [async-functions, class-static-methods-private, class]
|
||||
flags: [generated]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// - src/class-elements/grammar-static-private-gen-meth-prototype.case
|
||||
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Generator Private Methods can be named prototype (class declaration)
|
||||
description: Static Generator Private Methods can be named "#prototype" (class declaration)
|
||||
esid: prod-ClassElement
|
||||
features: [generators, class-static-methods-private, class]
|
||||
flags: [generated]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// - src/class-elements/grammar-static-private-meth-prototype.case
|
||||
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
|
||||
/*---
|
||||
description: Static Private Methods can be named prototype (class declaration)
|
||||
description: Static Private Methods can be named "#prototype" (class declaration)
|
||||
esid: prod-ClassElement
|
||||
features: [class-static-methods-private, class]
|
||||
flags: [generated]
|
||||
|
|
Loading…
Reference in New Issue