| 375 | struct TestEval : TestQueue |
| 376 | { |
| 377 | virtual void Run() |
| 378 | { |
| 379 | nullcTerminate(); |
| 380 | nullcInit(MODULE_PATH); |
| 381 | nullcInitDynamicModule(); |
| 382 | |
| 383 | const char *testEval = |
| 384 | "import std.dynamic;\r\n\ |
| 385 | \r\n\ |
| 386 | int a = 5;\r\n\ |
| 387 | \r\n\ |
| 388 | for(int i = 0; i < 200; i++)\r\n\ |
| 389 | eval(\"a += 3 * \" + i.str() + \";\");\r\n\ |
| 390 | \r\n\ |
| 391 | return a;"; |
| 392 | double evalStart = myGetPreciseTime(); |
| 393 | for(unsigned t = 0; t < 2; t++) |
| 394 | { |
| 395 | if(!Tests::testExecutor[t]) |
| 396 | continue; |
| 397 | testsCount[t]++; |
| 398 | if(Tests::RunCode(testEval, t, "59705", "Dynamic code. eval()")) |
| 399 | testsPassed[t]++; |
| 400 | printf("Eval test finished in %f\r\n", myGetPreciseTime() - evalStart); |
| 401 | } |
| 402 | nullcTerminate(); |
| 403 | nullcInit(MODULE_PATH); |
| 404 | nullcInitDynamicModule(); |
| 405 | } |
| 406 | }; |
| 407 | TestEval testEval; |
| 408 |
nothing calls this directly
no test coverage detected