123456789101112131415161718192021222324252627 |
- startTest("dromaeo-core-eval", 'efec1da2');
- // 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();
|