Index: test/mjsunit/string-charcodeat.js |
diff --git a/test/mjsunit/string-charcodeat.js b/test/mjsunit/string-charcodeat.js |
index 831f688fd4538c6cbd8b13b8c29bffc6a4759e4e..fb7ab9af86c3505df9aac480e8757a7bca5789e3 100644 |
--- a/test/mjsunit/string-charcodeat.js |
+++ b/test/mjsunit/string-charcodeat.js |
@@ -153,6 +153,17 @@ TestStringType(Slice16End, true); |
TestStringType(Flat16, true); |
TestStringType(NotAString16, true); |
+ |
+function ConsNotSmiIndex() { |
+ var str = Cons(); |
+ assertTrue(isNaN(str.charCodeAt(0x7fffffff))); |
+} |
+ |
+for (var i = 0; i < 100000; i++) { |
+ ConsNotSmiIndex(); |
+} |
+ |
+ |
for (var i = 0; i != 10; i++) { |
assertEquals(101, Cons16().charCodeAt(1.1)); |
assertEquals('e', Cons16().charAt(1.1)); |