Revision: 1734 http://svn.sourceforge.net/vexi/?rev=1734&view=rev Author: mkpg2 Date: 2007-03-16 10:14:33 -0700 (Fri, 16 Mar 2007)
Log Message: ----------- Test case for for(key in obj) Added Paths: ----------- core/trunk/org.ibex.js/src_junit/test/js/general/forin.js Added: core/trunk/org.ibex.js/src_junit/test/js/general/forin.js =================================================================== --- core/trunk/org.ibex.js/src_junit/test/js/general/forin.js (rev 0) +++ core/trunk/org.ibex.js/src_junit/test/js/general/forin.js 2007-03-16 17:14:33 UTC (rev 1734) @@ -0,0 +1,10 @@ + +var obj = {a:"x", y:"b", c:"z"}; +var rec = {}; +for(var x in obj){ + sys.print(x +":" + obj[x]); + rec[x] = obj[x]; +}; +assert(rec.a=="x"); +assert(rec.y=="b"); +assert(rec.c=="z"); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn