From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../toString/setter-class-expression-static.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 js/src/tests/test262/built-ins/Function/prototype/toString/setter-class-expression-static.js (limited to 'js/src/tests/test262/built-ins/Function/prototype/toString/setter-class-expression-static.js') diff --git a/js/src/tests/test262/built-ins/Function/prototype/toString/setter-class-expression-static.js b/js/src/tests/test262/built-ins/Function/prototype/toString/setter-class-expression-static.js new file mode 100644 index 0000000000..301ee40dcf --- /dev/null +++ b/js/src/tests/test262/built-ins/Function/prototype/toString/setter-class-expression-static.js @@ -0,0 +1,19 @@ +// Copyright (C) 2016 Michael Ficarra. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation +description: Function.prototype.toString on a setter (class; static) +includes: [nativeFunctionMatcher.js] +---*/ + +let x = "h"; +let f = Object.getOwnPropertyDescriptor(class { static /* before */set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }/* after */ }, "f").set; +let g = Object.getOwnPropertyDescriptor(class { static /* before */set /* a */ [ /* b */ "g" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ }, "g").set; +let h = Object.getOwnPropertyDescriptor(class { static /* before */set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }/* after */ }, "h").set; + +assertToStringOrNativeFunction(f, "set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }"); +assertToStringOrNativeFunction(g, "set /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); +assertToStringOrNativeFunction(h, "set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); + +reportCompare(0, 0); -- cgit v1.2.3