diff options
author | Michael Ficarra <mficarra@shapesecurity.com> | 2018-03-06 18:18:00 -0800 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2018-03-07 14:09:45 -0500 |
commit | 83ffb4bbf2a7a2f68075c8e611525b55ea5cfecc (patch) | |
tree | b5592940e641b3b0e2b1c38dfe53eee2b9fcdacc /test/built-ins/Function/prototype/toString/setter-class-expression-static.js | |
parent | ce9419779fc61d5cdfa37a5cda7b6828c67221da (diff) | |
download | qtdeclarative-testsuites-83ffb4bbf2a7a2f68075c8e611525b55ea5cfecc.tar.gz |
allow any function to report its toString as a NativeFunction
related: https://github.com/tc39/Function-prototype-toString-revision/pull/26
Diffstat (limited to 'test/built-ins/Function/prototype/toString/setter-class-expression-static.js')
-rw-r--r-- | test/built-ins/Function/prototype/toString/setter-class-expression-static.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/built-ins/Function/prototype/toString/setter-class-expression-static.js b/test/built-ins/Function/prototype/toString/setter-class-expression-static.js index ab0b1ede4..51719e589 100644 --- a/test/built-ins/Function/prototype/toString/setter-class-expression-static.js +++ b/test/built-ins/Function/prototype/toString/setter-class-expression-static.js @@ -4,6 +4,7 @@ /*--- esid: sec-method-definitions-runtime-semantics-propertydefinitionevaluation description: Function.prototype.toString on a setter (class; static) +includes: [nativeFunctionMatcher.js] ---*/ let x = "h"; @@ -11,6 +12,6 @@ let f = Object.getOwnPropertyDescriptor(class { static /* before */set /* a */ f 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; -assert.sameValue(f.toString(), "set /* a */ f /* b */ ( /* c */ a /* d */ ) /* e */ { /* f */ }"); -assert.sameValue(g.toString(), "set /* a */ [ /* b */ \"g\" /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); -assert.sameValue(h.toString(), "set /* a */ [ /* b */ x /* c */ ] /* d */ ( /* e */ a /* f */ ) /* g */ { /* h */ }"); +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 */ }"); |