Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(736)

Unified Diff: test/mjsunit/harmony/block-conflicts-sloppy.js

Issue 1226103002: [es6] Handle conflicts for sloppy let (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: more comments and git rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/es6/block-let-semantics.js ('k') | test/mjsunit/harmony/block-let-semantics-sloppy.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 83%
copy from test/mjsunit/es6/block-conflicts.js
copy to test/mjsunit/harmony/block-conflicts-sloppy.js
index fdd581dd70b0e7b1d840054f527d6dcc940f24c7..25694edc5b0857f1a3b67ff0c6f4f99fe7e00915 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,12 @@ 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.
+ // TODO(littledan): Add tests using Realm.eval to ensure that global eval
+ // works as expected.
+ // 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 +59,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 + '");');
}
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;",
« no previous file with comments | « test/mjsunit/es6/block-let-semantics.js ('k') | test/mjsunit/harmony/block-let-semantics-sloppy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698