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

Unified Diff: test/mjsunit/debug-evaluate-locals.js

Issue 6489: Exclude the bit-field bits from string hash codes. String hash codes... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 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 | « src/stub-cache-ia32.cc ('k') | test/mjsunit/regress/regress-1170187.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-evaluate-locals.js
===================================================================
--- test/mjsunit/debug-evaluate-locals.js (revision 435)
+++ test/mjsunit/debug-evaluate-locals.js (working copy)
@@ -32,29 +32,59 @@
listenerComplete = false;
exception = false;
+
+function checkFrame0(name, value) {
+ assertTrue(name == 'a' || name == 'b');
+ if (name == 'a') {
+ assertEquals(1, value);
+ }
+ if (name == 'b') {
+ assertEquals(2, value);
+ }
+}
+
+
+function checkFrame1(name, value) {
+ assertTrue(name == '.arguments' || name == 'a');
+ if (name == 'a') {
+ assertEquals(3, value);
+ }
+}
+
+
+function checkFrame2(name, value) {
+ assertTrue(name == '.arguments' || name == 'a' ||
+ name == 'arguments' || name == 'b');
+ if (name == 'a') {
+ assertEquals(5, value);
+ }
+ if (name == 'b') {
+ assertEquals(0, value);
+ }
+}
+
+
function listener(event, exec_state, event_data, data) {
try {
if (event == Debug.DebugEvent.Break)
{
// Frame 0 has normal variables a and b.
- assertEquals('a', exec_state.frame(0).localName(0));
- assertEquals('b', exec_state.frame(0).localName(1));
- assertEquals(1, exec_state.frame(0).localValue(0).value());
- assertEquals(2, exec_state.frame(0).localValue(1).value());
+ var frame0 = exec_state.frame(0);
+ checkFrame0(frame0.localName(0), frame0.localValue(0).value());
+ checkFrame0(frame0.localName(1), frame0.localValue(1).value());
// Frame 1 has normal variable a (and the .arguments variable).
- assertEquals('.arguments', exec_state.frame(1).localName(0));
- assertEquals('a', exec_state.frame(1).localName(1));
- assertEquals(3, exec_state.frame(1).localValue(1).value());
+ var frame1 = exec_state.frame(1);
+ checkFrame1(frame1.localName(0), frame1.localValue(0).value());
+ checkFrame1(frame1.localName(1), frame1.localValue(1).value());
- // Frame 0 has normal variables a and b (and both the .arguments and
+ // Frame 2 has normal variables a and b (and both the .arguments and
// arguments variable).
- assertEquals('.arguments', exec_state.frame(2).localName(0));
- assertEquals('a', exec_state.frame(2).localName(1));
- assertEquals('arguments', exec_state.frame(2).localName(2));
- assertEquals('b', exec_state.frame(2).localName(3));
- assertEquals(5, exec_state.frame(2).localValue(1).value());
- assertEquals(0, exec_state.frame(2).localValue(3).value());
+ var frame2 = exec_state.frame(2);
+ checkFrame2(frame2.localName(0), frame2.localValue(0).value());
+ checkFrame2(frame2.localName(1), frame2.localValue(1).value());
+ checkFrame2(frame2.localName(2), frame2.localValue(2).value());
+ checkFrame2(frame2.localName(3), frame2.localValue(3).value());
// Evaluating a and b on frames 0, 1 and 2 produces 1, 2, 3, 4, 5 and 6.
assertEquals(1, exec_state.frame(0).evaluate('a').value());
« no previous file with comments | « src/stub-cache-ia32.cc ('k') | test/mjsunit/regress/regress-1170187.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698