Chromium Code Reviews| Index: test/mjsunit/harmony/block-conflicts-sloppy.js |
| diff --git a/test/mjsunit/es6/block-conflicts.js b/test/mjsunit/harmony/block-conflicts-sloppy.js |
| similarity index 84% |
| copy from test/mjsunit/es6/block-conflicts.js |
| copy to test/mjsunit/harmony/block-conflicts-sloppy.js |
| index fdd581dd70b0e7b1d840054f527d6dcc940f24c7..70b2017b117a3ba1b3e7b3315d8920eb03532bad 100644 |
| --- a/test/mjsunit/es6/block-conflicts.js |
| +++ b/test/mjsunit/harmony/block-conflicts-sloppy.js |
| @@ -4,7 +4,7 @@ |
| // Test for conflicting variable bindings. |
| -"use strict"; |
| +// Flags: --no-legacy-const --harmony-sloppy |
| function CheckException(e) { |
| var string = e.toString(); |
| @@ -44,8 +44,10 @@ function TestAll(expected,s,opt_e) { |
| var e = ""; |
| var msg = s; |
| if (opt_e) { e = opt_e; msg += opt_e; } |
| - assertEquals(expected === 'LocalConflict' ? 'NoConflict' : expected, |
| - TestGlobal(s,e), "global:'" + msg + "'"); |
| + // TODO(littledan): https://code.google.com/p/v8/issues/detail?id=4288 |
| + // It is also not clear whether these tests makes sense in sloppy mode. |
| + // assertEquals(expected === 'LocalConflict' ? 'NoConflict' : expected, |
| + // TestGlobal(s,e), "global:'" + msg + "'"); |
| assertEquals(expected === 'LocalConflict' ? 'NoConflict' : expected, |
| TestFunction(s,e), "function:'" + msg + "'"); |
| assertEquals(expected === 'LocalConflict' ? 'Conflict' : expected, |
| @@ -55,17 +57,22 @@ function TestAll(expected,s,opt_e) { |
| function TestConflict(s) { |
| TestAll('Conflict', s); |
| - TestAll('Conflict', 'eval("' + s + '");'); |
| + // TODO(littledan): https://code.google.com/p/v8/issues/detail?id=4288 |
| + // It is also not clear whether these tests makes sense in sloppy mode. |
| + // TestAll('Conflict', 'eval("' + s + '");'); |
|
Dan Ehrenberg
2015/07/08 23:42:13
I don't see why these tests wouldn't make sense. W
arv (Not doing code reviews)
2015/07/09 14:30:53
See the bug.
eval('let x; var x;')
is more sim
rossberg
2015/07/10 12:13:17
I suppose
let x; eval('var x');
is an error in s
arv (Not doing code reviews)
2015/07/10 13:00:48
The other tests wrap the string in a function or a
|
| } |
| function TestNoConflict(s) { |
| TestAll('NoConflict', s, "'NoConflict'"); |
| - TestAll('NoConflict', 'eval("' + s + '");', "'NoConflict'"); |
| + // TODO(littledan): https://code.google.com/p/v8/issues/detail?id=4288 |
| + // TestAll('NoConflict', 'eval("' + s + '");', "'NoConflict'"); |
| } |
| function TestLocalConflict(s) { |
| TestAll('LocalConflict', s, "'NoConflict'"); |
| - TestAll('NoConflict', 'eval("' + s + '");', "'NoConflict'"); |
| + // TODO(littledan): https://code.google.com/p/v8/issues/detail?id=4288 |
| + // It is also not clear whether these tests makes sense in sloppy mode. |
| + // TestAll('NoConflict', 'eval("' + s + '");', "'NoConflict'"); |
| } |
| var letbinds = [ "let x;", |