MCPcopy Create free account
hub / github.com/WheretIB/nullc / Run

Method Run

tests/TestStackRealloc.cpp:377–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375struct 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\
386int a = 5;\r\n\
387\r\n\
388for(int i = 0; i < 200; i++)\r\n\
389 eval(\"a += 3 * \" + i.str() + \";\");\r\n\
390\r\n\
391return 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};
407TestEval testEval;
408

Callers

nothing calls this directly

Calls 6

nullcTerminateFunction · 0.85
nullcInitFunction · 0.85
forFunction · 0.85
evalFunction · 0.85
myGetPreciseTimeFunction · 0.70
nullcInitDynamicModuleFunction · 0.50

Tested by

no test coverage detected