Reviewers: Yang,
Description:
Add debug-stepnext test for for-let loops
Please review this at https://codereview.chromium.org/1215383002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+6, -2 lines):
M test/mjsunit/es6/debug-stepnext-for.js
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
83a9fc3f2226ab8277b1269f942b62120c8eb1e4..a6724702ba31350f0c1fbb0a9c22d6058f78801a
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, ...
"l11","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);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.