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

Unified Diff: test/mjsunit/es6/debug-stepnext-for.js

Issue 1215383002: Add debug-stepnext test for for-let loops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/debug-stepnext-for.js
diff --git a/test/mjsunit/es6/debug-stepnext-for.js b/test/mjsunit/es6/debug-stepnext-for.js
index f15e4781cf4699eca2fec3f467ae0350b340dcaa..fe50fa76b9f894f97e2a5d0fd57c0437f539ac2b 100644
--- a/test/mjsunit/es6/debug-stepnext-for.js
+++ b/test/mjsunit/es6/debug-stepnext-for.js
@@ -58,7 +58,9 @@ function f() {
s += a[j]; // Break L
}
- // TODO(yangguo): add test case for for-let.
+ for (let i = 0; i < 3; i++) { // Break m
+ s += a[i]; // Break M
+ }
} // Break y
function listener(event, exec_state, event_data, data) {
@@ -107,11 +109,13 @@ var expected = [
"k7","k20","K4","k23","k20","K4","k23","k20","K4","k23","k20",
// For: init, condition, body, next, condition, body, ...
"l7","l16","L4","l19","l16","L4","l19","l16","L4","l19","l16",
+ // For-let: init, condition, body, next, condition, body, ...
+ "m7","m20","M4","m23","m20","M4","m23","m20","M4","m23","m20",
// Exit.
"y0","z0",
]
print("expected:\n"+ JSON.stringify(expected));
assertArrayEquals(expected, log);
-assertEquals(48, s);
+assertEquals(54, s);
assertNull(exception);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698