blob: aa2eea9fa2905451b71195b2e2fbe7f95d4e7a97 [file] [log] [blame]
<html>
<head>
<script src="../htmlrunner.js"></script>
<script>
window.onload = function(){ startTest("dromaeo-core-eval", '');
// Try to force real results
var ret, tmp;
// The commands that we'll be evaling
var cmd = 'var str="";for(var i=0;i<1000;i++){str += "a";}ret = str;';
// TESTS: eval()
var num = 4;
prep(function(){
tmp = cmd;
for ( var n = 0; n < num; n++ )
tmp += tmp;
});
test( "Normal eval", function(){
eval(tmp);
});
test( "new Function", function(){
(new Function(tmp))();
});
endTest(); };
</script>
</head>
<body></body>
</html>