Index: test/mjsunit/number-string-index-call.js |
=================================================================== |
--- test/mjsunit/number-string-index-call.js (revision 0) |
+++ test/mjsunit/number-string-index-call.js (revision 0) |
@@ -0,0 +1,7 @@ |
+var callbacks = [ function() {return 'foo'}, "nonobject" ]; |
+assertEquals('foo', callbacks['0']()); |
+assertThrows("callbacks['2']()"); |
+ |
+// The following test only works when --call_regexp is enabled in V8. |
Kasper Lund
2008/09/08 05:27:21
You can enable flags for specific test by adding a
Feng Qian
2008/09/08 18:58:48
Done.
|
+// var callbacks = [ /abc/ ]; |
+// assertEquals('abc', callbacks['0']("abcdefg")); |