diff options
author | Valerie R Young <valerie@bocoup.com> | 2017-10-18 15:24:39 -0400 |
---|---|---|
committer | Valerie R Young <valerie@bocoup.com> | 2017-10-18 16:24:22 -0400 |
commit | 5e7ae4af8fd5463226e271c53a490e660f19a3b9 (patch) | |
tree | 46821e83a7272d67add8cf048d17a26f4c3241b8 /src | |
parent | 99ee383d3fc2e10342842cad40bad89db123fdc1 (diff) | |
download | qtdeclarative-testsuites-5e7ae4af8fd5463226e271c53a490e660f19a3b9.tar.gz |
Add private fields tests of early errors and small fix
Diffstat (limited to 'src')
11 files changed, 143 insertions, 0 deletions
diff --git a/src/class-fields/init-err-contains-boolean.case b/src/class-fields/init-err-contains-arguments.case index 605cdd32d..605cdd32d 100644 --- a/src/class-fields/init-err-contains-boolean.case +++ b/src/class-fields/init-err-contains-arguments.case diff --git a/src/class-fields/initializer-error/cls-decl-fields-private-arrow-fnc.template b/src/class-fields/initializer-error/cls-decl-fields-private-arrow-fnc.template new file mode 100644 index 000000000..4856108dc --- /dev/null +++ b/src/class-fields/initializer-error/cls-decl-fields-private-arrow-fnc.template @@ -0,0 +1,16 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-class-definitions-static-semantics-early-errors +path: language/statements/class/fields-private-arrow-fnc- +name: private field, arrow function expression +features: [arrow-function] +---*/ + +throw "Test262: This statement should not be evaluated."; + +class C { + #x = () => /*{ initializer }*/; +} + diff --git a/src/class-fields/initializer-error/cls-decl-fields-private-name.template b/src/class-fields/initializer-error/cls-decl-fields-private-name.template new file mode 100644 index 000000000..615ce8cef --- /dev/null +++ b/src/class-fields/initializer-error/cls-decl-fields-private-name.template @@ -0,0 +1,14 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-class-definitions-static-semantics-early-errors +path: language/statements/class/fields-private-literal-name- +name: ClassElementName PrivateName +---*/ + +throw "Test262: This statement should not be evaluated."; + +class C { + #x = /*{ initializer }*/; +} diff --git a/src/class-fields/initializer-error/cls-decl-fields-private-ternary.template b/src/class-fields/initializer-error/cls-decl-fields-private-ternary.template new file mode 100644 index 000000000..935d49fc8 --- /dev/null +++ b/src/class-fields/initializer-error/cls-decl-fields-private-ternary.template @@ -0,0 +1,14 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-class-definitions-static-semantics-early-errors +path: language/statements/class/fields-private-ternary- +name: private field, ternary expression +---*/ + +throw "Test262: This statement should not be evaluated."; + +class C { + #x = false ? {} : /*{ initializer }*/; +} diff --git a/src/class-fields/initializer-error/cls-decl-fields-private-typeof.template b/src/class-fields/initializer-error/cls-decl-fields-private-typeof.template new file mode 100644 index 000000000..ad7bddf90 --- /dev/null +++ b/src/class-fields/initializer-error/cls-decl-fields-private-typeof.template @@ -0,0 +1,14 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-class-definitions-static-semantics-early-errors +path: language/statements/class/fields-private-typeof- +name: private field, typeof expression +---*/ + +throw "Test262: This statement should not be evaluated."; + +class C { + #x = typeof /*{ initializer }*/; +} diff --git a/src/class-fields/initializer-error/cls-decl-fields-static-private-name.template b/src/class-fields/initializer-error/cls-decl-fields-static-private-name.template new file mode 100644 index 000000000..c50194b6a --- /dev/null +++ b/src/class-fields/initializer-error/cls-decl-fields-static-private-name.template @@ -0,0 +1,14 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-class-definitions-static-semantics-early-errors +path: language/statements/class/fields-static-private- +name: static PrivateName +---*/ + +throw "Test262: This statement should not be evaluated."; + +class C { + static #x = /*{ initializer }*/; +} diff --git a/src/class-fields/initializer-error/cls-expr-fields-private-arrow-fnc.template b/src/class-fields/initializer-error/cls-expr-fields-private-arrow-fnc.template new file mode 100644 index 000000000..1f62c0484 --- /dev/null +++ b/src/class-fields/initializer-error/cls-expr-fields-private-arrow-fnc.template @@ -0,0 +1,15 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-class-definitions-static-semantics-early-errors +path: language/expressions/class/fields-private-arrow-fnc- +name: private field, arrow function expression +features: [arrow-function] +---*/ + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x = () => /*{ initializer }*/; +} diff --git a/src/class-fields/initializer-error/cls-expr-fields-private-name.template b/src/class-fields/initializer-error/cls-expr-fields-private-name.template new file mode 100644 index 000000000..5c334c915 --- /dev/null +++ b/src/class-fields/initializer-error/cls-expr-fields-private-name.template @@ -0,0 +1,14 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-class-definitions-static-semantics-early-errors +path: language/expressions/class/fields-private-literal-name- +name: ClassElementName PrivateName +---*/ + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x = /*{ initializer }*/; +} diff --git a/src/class-fields/initializer-error/cls-expr-fields-private-ternary.template b/src/class-fields/initializer-error/cls-expr-fields-private-ternary.template new file mode 100644 index 000000000..0e8c57144 --- /dev/null +++ b/src/class-fields/initializer-error/cls-expr-fields-private-ternary.template @@ -0,0 +1,14 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-class-definitions-static-semantics-early-errors +path: language/expressions/class/fields-private-ternary- +name: private field, ternary expression +---*/ + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x = true ? {} : /*{ initializer }*/; +} diff --git a/src/class-fields/initializer-error/cls-expr-fields-private-typeof.template b/src/class-fields/initializer-error/cls-expr-fields-private-typeof.template new file mode 100644 index 000000000..bd2d6e3b0 --- /dev/null +++ b/src/class-fields/initializer-error/cls-expr-fields-private-typeof.template @@ -0,0 +1,14 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-class-definitions-static-semantics-early-errors +path: language/expressions/class/fields-private-typeof- +name: private field, typeof expression +---*/ + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x = typeof /*{ initializer }*/; +} diff --git a/src/class-fields/initializer-error/cls-expr-fields-static-private-name.template b/src/class-fields/initializer-error/cls-expr-fields-static-private-name.template new file mode 100644 index 000000000..0d3c770f9 --- /dev/null +++ b/src/class-fields/initializer-error/cls-expr-fields-static-private-name.template @@ -0,0 +1,14 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-class-definitions-static-semantics-early-errors +path: language/expressions/class/fields-static-private- +name: static PrivateName +---*/ + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static #x = /*{ initializer }*/; +} |