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

Unified Diff: test/mjsunit/number-string-index-call.js

Issue 1604: Fix issue http://code.google.com/p/v8/issues/detail?id=32... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 3 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
« src/ic.cc ('K') | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"));
« src/ic.cc ('K') | « test/cctest/test-api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698