Commit 91edfc5f authored by rossberg@chromium.org's avatar rossberg@chromium.org

Fix more WebKit test expectations

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/199613004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e3554870
...@@ -152,21 +152,21 @@ PASS 'use strict'; function f() { arguments-- } threw exception SyntaxError: Une ...@@ -152,21 +152,21 @@ PASS 'use strict'; function f() { arguments-- } threw exception SyntaxError: Une
PASS (function(){'use strict'; function f() { arguments-- }}) threw exception SyntaxError: Unexpected eval or arguments in strict mode. PASS (function(){'use strict'; function f() { arguments-- }}) threw exception SyntaxError: Unexpected eval or arguments in strict mode.
PASS global.eval('"use strict"; if (0) ++arguments; true;') threw exception SyntaxError: Unexpected eval or arguments in strict mode. PASS global.eval('"use strict"; if (0) ++arguments; true;') threw exception SyntaxError: Unexpected eval or arguments in strict mode.
PASS 'use strict'; ++(1, eval) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. PASS 'use strict'; ++(1, eval) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
FAIL (function(){'use strict'; ++(1, eval)}) should throw an exception. Was function (){'use strict'; ++(1, eval)}. PASS (function(){'use strict'; ++(1, eval)}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS 'use strict'; (1, eval)++ threw exception ReferenceError: Invalid left-hand side expression in postfix operation. PASS 'use strict'; (1, eval)++ threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
FAIL (function(){'use strict'; (1, eval)++}) should throw an exception. Was function (){'use strict'; (1, eval)++}. PASS (function(){'use strict'; (1, eval)++}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS 'use strict'; --(1, eval) threw exception ReferenceError: Invalid left-hand side expression in prefix operation. PASS 'use strict'; --(1, eval) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
FAIL (function(){'use strict'; --(1, eval)}) should throw an exception. Was function (){'use strict'; --(1, eval)}. PASS (function(){'use strict'; --(1, eval)}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS 'use strict'; (1, eval)-- threw exception ReferenceError: Invalid left-hand side expression in postfix operation. PASS 'use strict'; (1, eval)-- threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
FAIL (function(){'use strict'; (1, eval)--}) should throw an exception. Was function (){'use strict'; (1, eval)--}. PASS (function(){'use strict'; (1, eval)--}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
FAIL 'use strict'; function f() { ++(1, arguments) } should throw an exception. Was use strict. PASS 'use strict'; function f() { ++(1, arguments) } threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
FAIL (function(){'use strict'; function f() { ++(1, arguments) }}) should throw an exception. Was function (){'use strict'; function f() { ++(1, arguments) }}. PASS (function(){'use strict'; function f() { ++(1, arguments) }}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
FAIL 'use strict'; function f() { (1, arguments)++ } should throw an exception. Was use strict. PASS 'use strict'; function f() { (1, arguments)++ } threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
FAIL (function(){'use strict'; function f() { (1, arguments)++ }}) should throw an exception. Was function (){'use strict'; function f() { (1, arguments)++ }}. PASS (function(){'use strict'; function f() { (1, arguments)++ }}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
FAIL 'use strict'; function f() { --(1, arguments) } should throw an exception. Was use strict. PASS 'use strict'; function f() { --(1, arguments) } threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
FAIL (function(){'use strict'; function f() { --(1, arguments) }}) should throw an exception. Was function (){'use strict'; function f() { --(1, arguments) }}. PASS (function(){'use strict'; function f() { --(1, arguments) }}) threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
FAIL 'use strict'; function f() { (1, arguments)-- } should throw an exception. Was use strict. PASS 'use strict'; function f() { (1, arguments)-- } threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
FAIL (function(){'use strict'; function f() { (1, arguments)-- }}) should throw an exception. Was function (){'use strict'; function f() { (1, arguments)-- }}. PASS (function(){'use strict'; function f() { (1, arguments)-- }}) threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
FAIL 'use strict'; if (0) delete +a.b should throw an exception. Was use strict. FAIL 'use strict'; if (0) delete +a.b should throw an exception. Was use strict.
FAIL (function(){'use strict'; if (0) delete +a.b}) should throw an exception. Was function (){'use strict'; if (0) delete +a.b}. FAIL (function(){'use strict'; if (0) delete +a.b}) should throw an exception. Was function (){'use strict'; if (0) delete +a.b}.
FAIL 'use strict'; if (0) delete ++a.b should throw an exception. Was use strict. FAIL 'use strict'; if (0) delete ++a.b should throw an exception. Was use strict.
......
...@@ -21,12 +21,12 @@ ...@@ -21,12 +21,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PASS function f() { g()++; } f.toString() is 'function f() { g()++; }' FAIL function f() { g()++; } f.toString() should be function f() { g()++; }. Threw exception ReferenceError: Invalid left-hand side expression in postfix operation
PASS function f() { g()--; } f.toString() is 'function f() { g()--; }' FAIL function f() { g()--; } f.toString() should be function f() { g()--; }. Threw exception ReferenceError: Invalid left-hand side expression in postfix operation
PASS function f() { ++g(); } f.toString() is 'function f() { ++g(); }' FAIL function f() { ++g(); } f.toString() should be function f() { ++g(); }. Threw exception ReferenceError: Invalid left-hand side expression in prefix operation
PASS function f() { --g(); } f.toString() is 'function f() { --g(); }' FAIL function f() { --g(); } f.toString() should be function f() { --g(); }. Threw exception ReferenceError: Invalid left-hand side expression in prefix operation
PASS function f() { g() = 1; } f.toString() is 'function f() { g() = 1; }' FAIL function f() { g() = 1; } f.toString() should be function f() { g() = 1; }. Threw exception ReferenceError: Invalid left-hand side in assignment
PASS function f() { g() += 1; } f.toString() is 'function f() { g() += 1; }' FAIL function f() { g() += 1; } f.toString() should be function f() { g() += 1; }. Threw exception ReferenceError: Invalid left-hand side in assignment
FAIL g()++ should throw ReferenceError: Postfix ++ operator applied to value that is not a reference.. Threw exception ReferenceError: Invalid left-hand side expression in postfix operation. FAIL g()++ should throw ReferenceError: Postfix ++ operator applied to value that is not a reference.. Threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
FAIL g()-- should throw ReferenceError: Postfix -- operator applied to value that is not a reference.. Threw exception ReferenceError: Invalid left-hand side expression in postfix operation. FAIL g()-- should throw ReferenceError: Postfix -- operator applied to value that is not a reference.. Threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
FAIL ++g() should throw ReferenceError: Prefix ++ operator applied to value that is not a reference.. Threw exception ReferenceError: Invalid left-hand side expression in prefix operation. FAIL ++g() should throw ReferenceError: Prefix ++ operator applied to value that is not a reference.. Threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
......
...@@ -442,8 +442,8 @@ PASS Valid: "for ((++a) in b) break" ...@@ -442,8 +442,8 @@ PASS Valid: "for ((++a) in b) break"
PASS Valid: "function f() { for ((++a) in b) break }" PASS Valid: "function f() { for ((++a) in b) break }"
FAIL Invalid: "for (a, b in c) break" should throw undefined FAIL Invalid: "for (a, b in c) break" should throw undefined
FAIL Invalid: "function f() { for (a, b in c) break }" should throw undefined FAIL Invalid: "function f() { for (a, b in c) break }" should throw undefined
PASS Invalid: "for (a,b in c ;;) break" FAIL Invalid: "for (a,b in c ;;) break" should throw undefined
PASS Invalid: "function f() { for (a,b in c ;;) break }" FAIL Invalid: "function f() { for (a,b in c ;;) break }" should throw undefined
PASS Valid: "for (a,(b in c) ;;) break" PASS Valid: "for (a,(b in c) ;;) break"
PASS Valid: "function f() { for (a,(b in c) ;;) break }" PASS Valid: "function f() { for (a,(b in c) ;;) break }"
PASS Valid: "for ((a, b) in c) break" PASS Valid: "for ((a, b) in c) break"
......
...@@ -26,9 +26,9 @@ Test to ensure correct handling of --> as a single line comment when at the begi ...@@ -26,9 +26,9 @@ Test to ensure correct handling of --> as a single line comment when at the begi
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS 'should be a syntax error' --> threw exception SyntaxError: Unexpected end of input. PASS 'should be a syntax error' --> threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS /**/ 1 --> threw exception SyntaxError: Unexpected end of input. PASS /**/ 1 --> threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS 1 /**/ --> threw exception SyntaxError: Unexpected end of input. PASS 1 /**/ --> threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS 1/* PASS 1/*
*/--> threw exception SyntaxError: Unexpected token >. */--> threw exception SyntaxError: Unexpected token >.
PASS --> is undefined. PASS --> is undefined.
......
...@@ -26,42 +26,6 @@ This test checks that toString() round-trip on a function that has prefix, postf ...@@ -26,42 +26,6 @@ This test checks that toString() round-trip on a function that has prefix, postf
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS unevalf(eval(unevalf(prefix_should_preserve_parens))) is unevalf(prefix_should_preserve_parens)
PASS /.*\(+x\)*, y\)/.test(unevalf(prefix_should_preserve_parens)) is true
PASS prefix_should_preserve_parens(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS eval(unevalf(prefix_should_preserve_parens))(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS unevalf(eval(unevalf(postfix_should_preserve_parens))) is unevalf(postfix_should_preserve_parens)
PASS /.*\(+x\)*, y\)/.test(unevalf(postfix_should_preserve_parens)) is true
PASS postfix_should_preserve_parens(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS eval(unevalf(postfix_should_preserve_parens))(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS unevalf(eval(unevalf(both_should_preserve_parens))) is unevalf(both_should_preserve_parens)
PASS /.*\(+x\)*, y\)/.test(unevalf(both_should_preserve_parens)) is true
PASS both_should_preserve_parens(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS eval(unevalf(both_should_preserve_parens))(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS unevalf(eval(unevalf(prefix_should_preserve_parens_multi))) is unevalf(prefix_should_preserve_parens_multi)
PASS /.*\(+x\)*, y\)/.test(unevalf(prefix_should_preserve_parens_multi)) is true
PASS prefix_should_preserve_parens_multi(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS eval(unevalf(prefix_should_preserve_parens_multi))(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS unevalf(eval(unevalf(postfix_should_preserve_parens_multi))) is unevalf(postfix_should_preserve_parens_multi)
PASS /.*\(+x\)*, y\)/.test(unevalf(postfix_should_preserve_parens_multi)) is true
PASS postfix_should_preserve_parens_multi(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS eval(unevalf(postfix_should_preserve_parens_multi))(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS unevalf(eval(unevalf(prefix_should_preserve_parens_multi1))) is unevalf(prefix_should_preserve_parens_multi1)
PASS /.*\(+x\)*, y\)/.test(unevalf(prefix_should_preserve_parens_multi1)) is true
PASS prefix_should_preserve_parens_multi1(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS eval(unevalf(prefix_should_preserve_parens_multi1))(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS unevalf(eval(unevalf(postfix_should_preserve_parens_multi1))) is unevalf(postfix_should_preserve_parens_multi1)
PASS /.*\(+x\)*, y\)/.test(unevalf(postfix_should_preserve_parens_multi1)) is true
PASS postfix_should_preserve_parens_multi1(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS eval(unevalf(postfix_should_preserve_parens_multi1))(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS unevalf(eval(unevalf(prefix_should_preserve_parens_multi2))) is unevalf(prefix_should_preserve_parens_multi2)
PASS /.*\(+x\)*, y\)/.test(unevalf(prefix_should_preserve_parens_multi2)) is true
PASS prefix_should_preserve_parens_multi2(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS eval(unevalf(prefix_should_preserve_parens_multi2))(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in prefix operation.
PASS unevalf(eval(unevalf(postfix_should_preserve_parens_multi2))) is unevalf(postfix_should_preserve_parens_multi2)
PASS /.*\(+x\)*, y\)/.test(unevalf(postfix_should_preserve_parens_multi2)) is true
PASS postfix_should_preserve_parens_multi2(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS eval(unevalf(postfix_should_preserve_parens_multi2))(1, 2, 3); threw exception ReferenceError: Invalid left-hand side expression in postfix operation.
PASS unevalf(eval(unevalf(typeof_should_preserve_parens))) is unevalf(typeof_should_preserve_parens) PASS unevalf(eval(unevalf(typeof_should_preserve_parens))) is unevalf(typeof_should_preserve_parens)
PASS /.*\(+x\)*, y\)/.test(unevalf(typeof_should_preserve_parens)) is true PASS /.*\(+x\)*, y\)/.test(unevalf(typeof_should_preserve_parens)) is true
PASS typeof_should_preserve_parens('a', 1); is 'number' PASS typeof_should_preserve_parens('a', 1); is 'number'
......
...@@ -25,6 +25,8 @@ description( ...@@ -25,6 +25,8 @@ description(
"This test checks that toString() round-trip on a function that has prefix, postfix and typeof operators applied to group expression will not remove the grouping. Also checks that evaluation of such a expression produces run-time exception" "This test checks that toString() round-trip on a function that has prefix, postfix and typeof operators applied to group expression will not remove the grouping. Also checks that evaluation of such a expression produces run-time exception"
); );
/* These have become obsolete, since they are not syntactically well-formed ES5+.
function postfix_should_preserve_parens(x, y, z) { function postfix_should_preserve_parens(x, y, z) {
(x, y)++; (x, y)++;
return y; return y;
...@@ -78,6 +80,7 @@ function postfix_should_preserve_parens_multi2(x, y, z) { ...@@ -78,6 +80,7 @@ function postfix_should_preserve_parens_multi2(x, y, z) {
(((x), y) ,z)++; (((x), y) ,z)++;
return x; return x;
} }
*/
// if these return a variable (such as y) instead of // if these return a variable (such as y) instead of
// the result of typeof, this means that the parenthesis // the result of typeof, this means that the parenthesis
...@@ -138,6 +141,7 @@ function testToStringAndReturn(fn, p1, p2, retval) ...@@ -138,6 +141,7 @@ function testToStringAndReturn(fn, p1, p2, retval)
} }
/*
testToStringAndRTFailure("prefix_should_preserve_parens"); testToStringAndRTFailure("prefix_should_preserve_parens");
testToStringAndRTFailure("postfix_should_preserve_parens"); testToStringAndRTFailure("postfix_should_preserve_parens");
testToStringAndRTFailure("both_should_preserve_parens"); testToStringAndRTFailure("both_should_preserve_parens");
...@@ -147,6 +151,7 @@ testToStringAndRTFailure("prefix_should_preserve_parens_multi1"); ...@@ -147,6 +151,7 @@ testToStringAndRTFailure("prefix_should_preserve_parens_multi1");
testToStringAndRTFailure("postfix_should_preserve_parens_multi1"); testToStringAndRTFailure("postfix_should_preserve_parens_multi1");
testToStringAndRTFailure("prefix_should_preserve_parens_multi2"); testToStringAndRTFailure("prefix_should_preserve_parens_multi2");
testToStringAndRTFailure("postfix_should_preserve_parens_multi2"); testToStringAndRTFailure("postfix_should_preserve_parens_multi2");
*/
testToStringAndReturn("typeof_should_preserve_parens", "'a'", 1, "'number'"); testToStringAndReturn("typeof_should_preserve_parens", "'a'", 1, "'number'");
testToStringAndReturn("typeof_should_preserve_parens1", "'a'", 1, "'number'"); testToStringAndReturn("typeof_should_preserve_parens1", "'a'", 1, "'number'");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment