Index: test/mjsunit/regress/regress-2438.js |
diff --git a/test/mjsunit/regress/regress-2438.js b/test/mjsunit/regress/regress-2438.js |
index 51092788ac6f7fb8824f4df1e44f37f45cffd650..b9d8875cb597e6e47dc8214b316f633c18a530e3 100644 |
--- a/test/mjsunit/regress/regress-2438.js |
+++ b/test/mjsunit/regress/regress-2438.js |
@@ -27,20 +27,16 @@ |
function testSideEffects(subject, re) { |
var counter = 0; |
- var expected_counter = 0; |
- const accesses_lastindex = (re.global || re.sticky); |
var side_effect_object = { valueOf: function() { return counter++; } }; |
re.lastIndex = side_effect_object; |
re.exec(subject); |
- if (accesses_lastindex) expected_counter++; |
- assertEquals(expected_counter, counter); |
+ assertEquals(1, counter); |
re.lastIndex = side_effect_object; |
re.test(subject); |
- if (accesses_lastindex) expected_counter++; |
- assertEquals(expected_counter, counter); |
+ assertEquals(2, counter); |
} |
testSideEffects("zzzz", /a/); |