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

Unified Diff: test/mjsunit/const.js

Issue 18660: Fix handling of const initialization. We did not handle the fact that... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 11 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
Index: test/mjsunit/const.js
===================================================================
--- test/mjsunit/const.js (revision 1118)
+++ test/mjsunit/const.js (working copy)
@@ -52,17 +52,19 @@
function g() {
const o = { valueOf: function() { valueOfCount++; return 42; } }
assertEquals(42, o);
- assertEquals(0, valueOfCount);
+ assertEquals(1, valueOfCount);
Kasper Lund 2009/01/22 13:38:47 I wonder why this was zero before? It seems to con
o++;
assertEquals(42, o);
- assertEquals(1, valueOfCount);
+ assertEquals(3, valueOfCount);
++o;
assertEquals(42, o);
- assertEquals(2, valueOfCount);
+ assertEquals(5, valueOfCount);
o--;
assertEquals(42, o);
- assertEquals(3, valueOfCount);
+ assertEquals(7, valueOfCount);
--o;
assertEquals(42, o);
- assertEquals(4, valueOfCount);
+ assertEquals(9, valueOfCount);
}
+
+g();
« src/runtime.cc ('K') | « src/runtime.cc ('k') | test/mjsunit/const-eval-init.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698