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(); |