diff --git a/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-multiple-args.js b/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..af22068be0d41fa9c54b351ab800f222706f46c9 --- /dev/null +++ b/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-multiple-args.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/cls-decl-gen-meth-static.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (class declaration generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + static *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; + } +} + +C.method(42, 'TC39',).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-null.js b/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..04b050d3fd1df02bc82709c158fa83e10ac1070c --- /dev/null +++ b/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-null.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/cls-decl-gen-meth-static.template +/*--- +description: A trailing comma after null should not increase the arguments.length (class declaration generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + static *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; + } +} + +C.method(42, null,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-single-args.js b/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..f277d51337f678547c8ab509d5503a3d96de7701 --- /dev/null +++ b/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-single-args.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/cls-decl-gen-meth-static.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (class declaration generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + static *method() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; + } +} + +C.method(42,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-undefined.js b/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..b2782f1cd66e67a335656111466905145efffa70 --- /dev/null +++ b/test/language/arguments-object/cls-decl-gen-meth-static-trailing-comma-undefined.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/cls-decl-gen-meth-static.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (class declaration generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + static *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; + } +} + +C.method(42, undefined,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-multiple-args.js b/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..19404642d06bd4feed0038e435edbf7fc63e8696 --- /dev/null +++ b/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-multiple-args.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/cls-decl-gen-meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (class declaration generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; + } +} + +C.prototype.method(42, 'TC39',).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-null.js b/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..8a960cdcb0eddbc74fcc8f6ea01a822419dbed0b --- /dev/null +++ b/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-null.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/cls-decl-gen-meth.template +/*--- +description: A trailing comma after null should not increase the arguments.length (class declaration generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; + } +} + +C.prototype.method(42, null,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-single-args.js b/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..d507f4e5ec063105f1bfe070ffe66142ec3ece39 --- /dev/null +++ b/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-single-args.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/cls-decl-gen-meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (class declaration generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + *method() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; + } +} + +C.prototype.method(42,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-undefined.js b/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..453f515a4b7271a7a93e6f465a14ae52bc6d81d6 --- /dev/null +++ b/test/language/arguments-object/cls-decl-gen-meth-trailing-comma-undefined.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/cls-decl-gen-meth.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (class declaration generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; + } +} + +C.prototype.method(42, undefined,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-meth-static-trailing-comma-multiple-args.js b/test/language/arguments-object/cls-decl-meth-static-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..7d0c69d1545d7e6bd15da303b431ce8b18f0a18f --- /dev/null +++ b/test/language/arguments-object/cls-decl-meth-static-trailing-comma-multiple-args.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/cls-decl-meth-static.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (static class declaration method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + static method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; + } +} + +C.method(42, 'TC39',); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-meth-static-trailing-comma-null.js b/test/language/arguments-object/cls-decl-meth-static-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..6ac2ace1c0c698ae461789c4239503ce47759120 --- /dev/null +++ b/test/language/arguments-object/cls-decl-meth-static-trailing-comma-null.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/cls-decl-meth-static.template +/*--- +description: A trailing comma after null should not increase the arguments.length (static class declaration method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + static method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; + } +} + +C.method(42, null,); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-meth-static-trailing-comma-single-args.js b/test/language/arguments-object/cls-decl-meth-static-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..7389cc51e9bab8260460eaada96f850af3b615ec --- /dev/null +++ b/test/language/arguments-object/cls-decl-meth-static-trailing-comma-single-args.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/cls-decl-meth-static.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (static class declaration method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + static method() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; + } +} + +C.method(42,); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-meth-static-trailing-comma-undefined.js b/test/language/arguments-object/cls-decl-meth-static-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..3ee1f645ba3d344e466ecd74c2ef3c1f31824db2 --- /dev/null +++ b/test/language/arguments-object/cls-decl-meth-static-trailing-comma-undefined.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/cls-decl-meth-static.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (static class declaration method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + static method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; + } +} + +C.method(42, undefined,); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-meth-trailing-comma-multiple-args.js b/test/language/arguments-object/cls-decl-meth-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..b5910ff5931af68f88136e4d5f1adeea7e1a9042 --- /dev/null +++ b/test/language/arguments-object/cls-decl-meth-trailing-comma-multiple-args.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/cls-decl-meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (class declaration method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; + } +} + +C.prototype.method(42, 'TC39',); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-meth-trailing-comma-null.js b/test/language/arguments-object/cls-decl-meth-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..32a9d3a7648d7a06cf4110b919f360e621f6e1c2 --- /dev/null +++ b/test/language/arguments-object/cls-decl-meth-trailing-comma-null.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/cls-decl-meth.template +/*--- +description: A trailing comma after null should not increase the arguments.length (class declaration method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; + } +} + +C.prototype.method(42, null,); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-meth-trailing-comma-single-args.js b/test/language/arguments-object/cls-decl-meth-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..b3a6ba8a710047c764bd63542e63f55ad9a8dc06 --- /dev/null +++ b/test/language/arguments-object/cls-decl-meth-trailing-comma-single-args.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/cls-decl-meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (class declaration method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + method() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; + } +} + +C.prototype.method(42,); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-decl-meth-trailing-comma-undefined.js b/test/language/arguments-object/cls-decl-meth-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..ac3710a87074db75010048ffefacee69dd14b81b --- /dev/null +++ b/test/language/arguments-object/cls-decl-meth-trailing-comma-undefined.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/cls-decl-meth.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (class declaration method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +class C { + method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; + } +} + +C.prototype.method(42, undefined,); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-multiple-args.js b/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..1a797aa980f59ce1cbf6291fdf881356ba501f5c --- /dev/null +++ b/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-multiple-args.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/cls-expr-gen-meth-static.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (static class expression generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + static *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; + } +}; + +C.method(42, 'TC39',).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-null.js b/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..770887168cd30cf5e075b4f44419b75050fea1f0 --- /dev/null +++ b/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-null.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/cls-expr-gen-meth-static.template +/*--- +description: A trailing comma after null should not increase the arguments.length (static class expression generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + static *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; + } +}; + +C.method(42, null,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-single-args.js b/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..f729a442ca1a8828d54c6c9ad09cf4b8c3a50ed2 --- /dev/null +++ b/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-single-args.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/cls-expr-gen-meth-static.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (static class expression generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + static *method() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; + } +}; + +C.method(42,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-undefined.js b/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..5a36a31ab2dc4eecf7a762c6da0563f525cfd2a9 --- /dev/null +++ b/test/language/arguments-object/cls-expr-gen-meth-static-trailing-comma-undefined.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/cls-expr-gen-meth-static.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (static class expression generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + static *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; + } +}; + +C.method(42, undefined,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-multiple-args.js b/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..67ce4d54c59ea59bef629d93d85bc76ad932586a --- /dev/null +++ b/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-multiple-args.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/cls-expr-gen-meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (class expression generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; + } +}; + +C.prototype.method(42, 'TC39',).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-null.js b/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..b3b8402818968bbb51ac5e2bfcbbead639ba8025 --- /dev/null +++ b/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-null.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/cls-expr-gen-meth.template +/*--- +description: A trailing comma after null should not increase the arguments.length (class expression generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; + } +}; + +C.prototype.method(42, null,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-single-args.js b/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..2b025b1f272071032df28fbb06be4d7cb87142c5 --- /dev/null +++ b/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-single-args.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/cls-expr-gen-meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (class expression generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + *method() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; + } +}; + +C.prototype.method(42,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-undefined.js b/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..666723a9a1842a746ff869c80f7491b403dedb3c --- /dev/null +++ b/test/language/arguments-object/cls-expr-gen-meth-trailing-comma-undefined.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/cls-expr-gen-meth.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (class expression generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; + } +}; + +C.prototype.method(42, undefined,).next(); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-meth-static-trailing-comma-multiple-args.js b/test/language/arguments-object/cls-expr-meth-static-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..9720302d40f8d03168aa57176a8c8fa85f07c6ad --- /dev/null +++ b/test/language/arguments-object/cls-expr-meth-static-trailing-comma-multiple-args.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/cls-expr-meth-static.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (static class expression method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + static method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; + } +}; + +C.method(42, 'TC39',); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-meth-static-trailing-comma-null.js b/test/language/arguments-object/cls-expr-meth-static-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..02ebc63c388f83d7bc8c874fe1261622e688dad3 --- /dev/null +++ b/test/language/arguments-object/cls-expr-meth-static-trailing-comma-null.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/cls-expr-meth-static.template +/*--- +description: A trailing comma after null should not increase the arguments.length (static class expression method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + static method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; + } +}; + +C.method(42, null,); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-meth-static-trailing-comma-single-args.js b/test/language/arguments-object/cls-expr-meth-static-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..81cb12a473907703270c3a5f5acc27c1fa4c1bb6 --- /dev/null +++ b/test/language/arguments-object/cls-expr-meth-static-trailing-comma-single-args.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/cls-expr-meth-static.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (static class expression method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + static method() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; + } +}; + +C.method(42,); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-meth-static-trailing-comma-undefined.js b/test/language/arguments-object/cls-expr-meth-static-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..1c4d2553176d376a86e9676686efb92fa6133464 --- /dev/null +++ b/test/language/arguments-object/cls-expr-meth-static-trailing-comma-undefined.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/cls-expr-meth-static.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (static class expression method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + static method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; + } +}; + +C.method(42, undefined,); + +// Stores a reference `ref` for case evaluation +var ref = C.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-meth-trailing-comma-multiple-args.js b/test/language/arguments-object/cls-expr-meth-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..cf08d53d0bfb2d89954c9d4c5d071608b9e87562 --- /dev/null +++ b/test/language/arguments-object/cls-expr-meth-trailing-comma-multiple-args.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/cls-expr-meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (class expression method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; + } +}; + +C.prototype.method(42, 'TC39',); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-meth-trailing-comma-null.js b/test/language/arguments-object/cls-expr-meth-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..b1460168d41db4b70c871b1ca9e88a1aa5ef6780 --- /dev/null +++ b/test/language/arguments-object/cls-expr-meth-trailing-comma-null.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/cls-expr-meth.template +/*--- +description: A trailing comma after null should not increase the arguments.length (class expression method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; + } +}; + +C.prototype.method(42, null,); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-meth-trailing-comma-single-args.js b/test/language/arguments-object/cls-expr-meth-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..4b68d6fd37c2a7ff6b495d3ab117a6d7cec0103b --- /dev/null +++ b/test/language/arguments-object/cls-expr-meth-trailing-comma-single-args.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/cls-expr-meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (class expression method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + method() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; + } +}; + +C.prototype.method(42,); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/cls-expr-meth-trailing-comma-undefined.js b/test/language/arguments-object/cls-expr-meth-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..ffd2447438764f618c7d4a3d66ffa532261f360a --- /dev/null +++ b/test/language/arguments-object/cls-expr-meth-trailing-comma-undefined.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/cls-expr-meth.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (class expression method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var C = class { + method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; + } +}; + +C.prototype.method(42, undefined,); + +// Stores a reference `ref` for case evaluation +var ref = C.prototype.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/func-decl-trailing-comma-multiple-args.js b/test/language/arguments-object/func-decl-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..a431a3a944f519f9190decd7fb142692ee8d960d --- /dev/null +++ b/test/language/arguments-object/func-decl-trailing-comma-multiple-args.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/func-decl.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (function declaration) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +function ref() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; +} + +ref(42, 'TC39',); + +assert.sameValue(callCount, 1, 'function invoked exactly once'); diff --git a/test/language/arguments-object/func-decl-trailing-comma-null.js b/test/language/arguments-object/func-decl-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..2aa8c8284e6a12de97060e0c40f74be98d2387df --- /dev/null +++ b/test/language/arguments-object/func-decl-trailing-comma-null.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/func-decl.template +/*--- +description: A trailing comma after null should not increase the arguments.length (function declaration) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +function ref() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; +} + +ref(42, null,); + +assert.sameValue(callCount, 1, 'function invoked exactly once'); diff --git a/test/language/arguments-object/func-decl-trailing-comma-single-args.js b/test/language/arguments-object/func-decl-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..19f4eab18c450e154e76e6d93aecb036d4d84d2e --- /dev/null +++ b/test/language/arguments-object/func-decl-trailing-comma-single-args.js @@ -0,0 +1,33 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/func-decl.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (function declaration) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +function ref() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; +} + +ref(42,); + +assert.sameValue(callCount, 1, 'function invoked exactly once'); diff --git a/test/language/arguments-object/func-decl-trailing-comma-undefined.js b/test/language/arguments-object/func-decl-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..cb4bb55ca02113316140f68aaea2378d3f2f9ec2 --- /dev/null +++ b/test/language/arguments-object/func-decl-trailing-comma-undefined.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/func-decl.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (function declaration) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +function ref() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; +} + +ref(42, undefined,); + +assert.sameValue(callCount, 1, 'function invoked exactly once'); diff --git a/test/language/arguments-object/func-expr-trailing-comma-multiple-args.js b/test/language/arguments-object/func-expr-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..07a9ca9fd94e2535d8bda302487c8f94f1adb659 --- /dev/null +++ b/test/language/arguments-object/func-expr-trailing-comma-multiple-args.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/func-expr.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (function expression) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +var ref; +ref = function() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; +}; + +ref(42, 'TC39',); + +assert.sameValue(callCount, 1, 'function invoked exactly once'); diff --git a/test/language/arguments-object/func-expr-trailing-comma-null.js b/test/language/arguments-object/func-expr-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..242d0dd28b5c4b3ed74af372aa3f1ed74dcf7897 --- /dev/null +++ b/test/language/arguments-object/func-expr-trailing-comma-null.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/func-expr.template +/*--- +description: A trailing comma after null should not increase the arguments.length (function expression) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +var ref; +ref = function() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; +}; + +ref(42, null,); + +assert.sameValue(callCount, 1, 'function invoked exactly once'); diff --git a/test/language/arguments-object/func-expr-trailing-comma-single-args.js b/test/language/arguments-object/func-expr-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..3fc9a95c3519528dc0051471157a7fd18924aa85 --- /dev/null +++ b/test/language/arguments-object/func-expr-trailing-comma-single-args.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/func-expr.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (function expression) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +var ref; +ref = function() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; +}; + +ref(42,); + +assert.sameValue(callCount, 1, 'function invoked exactly once'); diff --git a/test/language/arguments-object/func-expr-trailing-comma-undefined.js b/test/language/arguments-object/func-expr-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..1516acf3de5bed79acb0cf7261aa260ce40997b3 --- /dev/null +++ b/test/language/arguments-object/func-expr-trailing-comma-undefined.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/func-expr.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (function expression) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +var ref; +ref = function() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; +}; + +ref(42, undefined,); + +assert.sameValue(callCount, 1, 'function invoked exactly once'); diff --git a/test/language/arguments-object/gen-func-decl-trailing-comma-multiple-args.js b/test/language/arguments-object/gen-func-decl-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..ff1ac6f609a975a88b292e9b90541c1daf5b558a --- /dev/null +++ b/test/language/arguments-object/gen-func-decl-trailing-comma-multiple-args.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/gen-func-decl.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (generator function declaration) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +function* ref() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; +} + +ref(42, 'TC39',).next(); + +assert.sameValue(callCount, 1, 'generator function invoked exactly once'); diff --git a/test/language/arguments-object/gen-func-decl-trailing-comma-null.js b/test/language/arguments-object/gen-func-decl-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..7d3a1ecf3ff97b009ed19b8071e570cbee611d81 --- /dev/null +++ b/test/language/arguments-object/gen-func-decl-trailing-comma-null.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/gen-func-decl.template +/*--- +description: A trailing comma after null should not increase the arguments.length (generator function declaration) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +function* ref() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; +} + +ref(42, null,).next(); + +assert.sameValue(callCount, 1, 'generator function invoked exactly once'); diff --git a/test/language/arguments-object/gen-func-decl-trailing-comma-single-args.js b/test/language/arguments-object/gen-func-decl-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..000a932a56b01e54e848fcf7f6f47c18643e1938 --- /dev/null +++ b/test/language/arguments-object/gen-func-decl-trailing-comma-single-args.js @@ -0,0 +1,33 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/gen-func-decl.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (generator function declaration) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +function* ref() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; +} + +ref(42,).next(); + +assert.sameValue(callCount, 1, 'generator function invoked exactly once'); diff --git a/test/language/arguments-object/gen-func-decl-trailing-comma-undefined.js b/test/language/arguments-object/gen-func-decl-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..e1d772bc3925456696b24f22319f8ff4e1e6c891 --- /dev/null +++ b/test/language/arguments-object/gen-func-decl-trailing-comma-undefined.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/gen-func-decl.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (generator function declaration) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +function* ref() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; +} + +ref(42, undefined,).next(); + +assert.sameValue(callCount, 1, 'generator function invoked exactly once'); diff --git a/test/language/arguments-object/gen-func-expr-trailing-comma-multiple-args.js b/test/language/arguments-object/gen-func-expr-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..63f091146185df95d6ca03d14f0e7f0bf6b6f254 --- /dev/null +++ b/test/language/arguments-object/gen-func-expr-trailing-comma-multiple-args.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/gen-func-expr.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (generator function expression) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +var ref; +ref = function*() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; +}; + +ref(42, 'TC39',).next(); + +assert.sameValue(callCount, 1, 'generator function invoked exactly once'); diff --git a/test/language/arguments-object/gen-func-expr-trailing-comma-null.js b/test/language/arguments-object/gen-func-expr-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..cac540994a5267f0f46bd3aa4040668c9cf4be65 --- /dev/null +++ b/test/language/arguments-object/gen-func-expr-trailing-comma-null.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/gen-func-expr.template +/*--- +description: A trailing comma after null should not increase the arguments.length (generator function expression) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +var ref; +ref = function*() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; +}; + +ref(42, null,).next(); + +assert.sameValue(callCount, 1, 'generator function invoked exactly once'); diff --git a/test/language/arguments-object/gen-func-expr-trailing-comma-single-args.js b/test/language/arguments-object/gen-func-expr-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..a8a977ec153d82f0e22a0f121ddbdd666b6e820c --- /dev/null +++ b/test/language/arguments-object/gen-func-expr-trailing-comma-single-args.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/gen-func-expr.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (generator function expression) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +var ref; +ref = function*() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; +}; + +ref(42,).next(); + +assert.sameValue(callCount, 1, 'generator function invoked exactly once'); diff --git a/test/language/arguments-object/gen-func-expr-trailing-comma-undefined.js b/test/language/arguments-object/gen-func-expr-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..8c9f829e65d40fd601f8d7979a0d526483183741 --- /dev/null +++ b/test/language/arguments-object/gen-func-expr-trailing-comma-undefined.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/gen-func-expr.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (generator function expression) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +// Stores a reference `ref` for case evaluation +var ref; +ref = function*() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; +}; + +ref(42, undefined,).next(); + +assert.sameValue(callCount, 1, 'generator function invoked exactly once'); diff --git a/test/language/arguments-object/gen-meth-trailing-comma-multiple-args.js b/test/language/arguments-object/gen-meth-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..633968c46b8b5585ebbe9932445b6ed88b052226 --- /dev/null +++ b/test/language/arguments-object/gen-meth-trailing-comma-multiple-args.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/gen-meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var obj = { + *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; + } +}; + +obj.method(42, 'TC39',).next(); + +// Stores a reference `ref` for case evaluation +var ref = obj.method; + +assert.sameValue(callCount, 1, 'generator method invoked exactly once'); diff --git a/test/language/arguments-object/gen-meth-trailing-comma-null.js b/test/language/arguments-object/gen-meth-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..f39d4abf8e15912a031ba9f35b6a1d1f8ccb3e67 --- /dev/null +++ b/test/language/arguments-object/gen-meth-trailing-comma-null.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/gen-meth.template +/*--- +description: A trailing comma after null should not increase the arguments.length (generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var obj = { + *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; + } +}; + +obj.method(42, null,).next(); + +// Stores a reference `ref` for case evaluation +var ref = obj.method; + +assert.sameValue(callCount, 1, 'generator method invoked exactly once'); diff --git a/test/language/arguments-object/gen-meth-trailing-comma-single-args.js b/test/language/arguments-object/gen-meth-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..b162f30b3e283b75ece5329f74d7bc69c2b25969 --- /dev/null +++ b/test/language/arguments-object/gen-meth-trailing-comma-single-args.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/gen-meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var obj = { + *method() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; + } +}; + +obj.method(42,).next(); + +// Stores a reference `ref` for case evaluation +var ref = obj.method; + +assert.sameValue(callCount, 1, 'generator method invoked exactly once'); diff --git a/test/language/arguments-object/gen-meth-trailing-comma-undefined.js b/test/language/arguments-object/gen-meth-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..438aeae9eaa0e446e38172e8e73e6c4c781feadb --- /dev/null +++ b/test/language/arguments-object/gen-meth-trailing-comma-undefined.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/gen-meth.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (generator method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var obj = { + *method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; + } +}; + +obj.method(42, undefined,).next(); + +// Stores a reference `ref` for case evaluation +var ref = obj.method; + +assert.sameValue(callCount, 1, 'generator method invoked exactly once'); diff --git a/test/language/arguments-object/meth-trailing-comma-multiple-args.js b/test/language/arguments-object/meth-trailing-comma-multiple-args.js new file mode 100644 index 0000000000000000000000000000000000000000..6bd15dcc0890f60b501b8532e83b9a7a874056dd --- /dev/null +++ b/test/language/arguments-object/meth-trailing-comma-multiple-args.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-multiple-args.case +// - src/arguments/default/meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using multiple args (method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var obj = { + method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], 'TC39'); + callCount = callCount + 1; + } +}; + +obj.method(42, 'TC39',); + +// Stores a reference `ref` for case evaluation +var ref = obj.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/meth-trailing-comma-null.js b/test/language/arguments-object/meth-trailing-comma-null.js new file mode 100644 index 0000000000000000000000000000000000000000..9645f4739cf304390e4e2f0a47ec1ecb19ecf576 --- /dev/null +++ b/test/language/arguments-object/meth-trailing-comma-null.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-null.case +// - src/arguments/default/meth.template +/*--- +description: A trailing comma after null should not increase the arguments.length (method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var obj = { + method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], null); + callCount = callCount + 1; + } +}; + +obj.method(42, null,); + +// Stores a reference `ref` for case evaluation +var ref = obj.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/meth-trailing-comma-single-args.js b/test/language/arguments-object/meth-trailing-comma-single-args.js new file mode 100644 index 0000000000000000000000000000000000000000..571fe47a8ff28e6599ae4b59172d8c1445bf12e8 --- /dev/null +++ b/test/language/arguments-object/meth-trailing-comma-single-args.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-single-args.case +// - src/arguments/default/meth.template +/*--- +description: A trailing comma should not increase the arguments.length, using a single arg (method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var obj = { + method() { + assert.sameValue(arguments.length, 1); + assert.sameValue(arguments[0], 42); + callCount = callCount + 1; + } +}; + +obj.method(42,); + +// Stores a reference `ref` for case evaluation +var ref = obj.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once'); diff --git a/test/language/arguments-object/meth-trailing-comma-undefined.js b/test/language/arguments-object/meth-trailing-comma-undefined.js new file mode 100644 index 0000000000000000000000000000000000000000..aee2de278d609951dd13fbe2de1cafe6d7a93e3b --- /dev/null +++ b/test/language/arguments-object/meth-trailing-comma-undefined.js @@ -0,0 +1,38 @@ +// This file was procedurally generated from the following sources: +// - src/arguments/trailing-comma-undefined.case +// - src/arguments/default/meth.template +/*--- +description: A trailing comma after undefined should not increase the arguments.length (method) +esid: sec-arguments-exotic-objects +flags: [generated] +info: | + 9.4.4 Arguments Exotic Objects + + Most ECMAScript functions make an arguments object available to their code. Depending upon the + characteristics of the function definition, its arguments object is either an ordinary object + or an arguments exotic object. + + Trailing comma in the arguments list + + 12.3 Left-Hand-Side Expressions + + Arguments[Yield, Await] : ( ArgumentList[?Yield, ?Await] , ) +---*/ + + +var callCount = 0; +var obj = { + method() { + assert.sameValue(arguments.length, 2); + assert.sameValue(arguments[0], 42); + assert.sameValue(arguments[1], undefined); + callCount = callCount + 1; + } +}; + +obj.method(42, undefined,); + +// Stores a reference `ref` for case evaluation +var ref = obj.method; + +assert.sameValue(callCount, 1, 'method invoked exactly once');