Generate tests

This commit is contained in:
Kubilay Kahveci 2018-09-17 21:52:40 +01:00 committed by Rick Waldron
parent 6b808920dd
commit 395adc3a7c
24 changed files with 614 additions and 0 deletions

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-get-field.case
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private getter and a private field with the same name (class expression)
esid: prod-ClassElement
features: [class-methods-private, class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#m;
get #m() {}
};

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-get-get.case
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains multiple private getters with the same name (class expression)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
get #m() {}
get #m() {}
};

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-field.case
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private method and a private field with the same name (class expression)
esid: prod-ClassElement
features: [class-methods-private, class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#m;
#m() {}
};

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-get.case
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private method and a private getter with the same name (class expression)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
get #m() {}
#m() {}
};

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-meth.case
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains multiple private methods with the same name (class expression)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#m() {}
#m() {}
};

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-set.case
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private method and a private setter with the same name (class expression)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
set #m(_) {}
#m() {}
};

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-staticfield.case
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private method and a private static field with the same name (class expression)
esid: prod-ClassElement
features: [class-methods-private, class-static-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
static #m;
#m() {}
};

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-staticmeth.case
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private method and a private static method with the same name (class expression)
esid: prod-ClassElement
features: [class-methods-private, class-static-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
static #m() {}
#m() {}
};

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-set-field.case
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private setter and a private field with the same name (class expression)
esid: prod-ClassElement
features: [class-methods-private, class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#m;
set #m(_) {}
};

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-set-set.case
// - src/class-elements/syntax/invalid/cls-expr-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains multiple private setters with the same name (class expression)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
set #m(_) {}
set #m(_) {}
};

View File

@ -0,0 +1,21 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-get-set.case
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
/*---
description: It's valid if a class contains a private getter and a private setter with the same name (class expression)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
var C = class {
get #m() {}
set #m(_) {}
};

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-nestedclassmeth.case
// - src/class-elements/syntax/valid/cls-expr-elements-valid-syntax.template
/*---
description: It's valid if a nested class shadows a private method (class expression)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
var C = class {
constructor() {
class B {
#m() {}
}
}
#m() {}
};

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-get-field.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private getter and a private field with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#m;
get #m() {}
}

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-get-get.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains multiple private getters with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
get #m() {}
get #m() {}
}

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-field.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private method and a private field with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#m;
#m() {}
}

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-get.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private method and a private getter with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
get #m() {}
#m() {}
}

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-meth.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains multiple private methods with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#m() {}
#m() {}
}

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-set.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private method and a private setter with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
set #m(_) {}
#m() {}
}

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-staticfield.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private method and a private static field with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class-static-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
static #m;
#m() {}
}

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-staticmeth.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private method and a private static method with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class-static-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
static #m() {}
#m() {}
}

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-set-field.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains a private setter and a private field with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#m;
set #m(_) {}
}

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-set-set.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: It's a SyntaxError if a class contains multiple private setters with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
set #m(_) {}
set #m(_) {}
}

View File

@ -0,0 +1,21 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-get-set.case
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
/*---
description: It's valid if a class contains a private getter and a private setter with the same name (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
class C {
get #m() {}
set #m(_) {}
}

View File

@ -0,0 +1,26 @@
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-privatemeth-duplicate-meth-nestedclassmeth.case
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
/*---
description: It's valid if a nested class shadows a private method (class declaration)
esid: prod-ClassElement
features: [class-methods-private, class]
flags: [generated]
info: |
Static Semantics: Early Errors
ClassBody : ClassElementList
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries.
---*/
class C {
constructor() {
class B {
#m() {}
}
}
#m() {}
}