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

Method Run

tests/TestStackRealloc.cpp:433–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431struct TestVariableImportCorrectness : TestQueue
432{
433 virtual void Run()
434 {
435 nullcTerminate();
436 nullcInit(MODULE_PATH);
437 nullcInitDynamicModule();
438
439 const char *testVariableImportCorrectness =
440"import std.dynamic;\r\n\
441int x = 2;\r\n\
442eval(\"x = 4;\");\r\n\
443{ int n, m; }\r\n\
444int y = 3;\r\n\
445eval(\"y = 8;\");\r\n\
446return x * 10 + y;";
447 for(unsigned t = 0; t < 2; t++)
448 {
449 if(!Tests::testExecutor[t])
450 continue;
451 testsCount[t]++;
452 if(Tests::RunCode(testVariableImportCorrectness, t, "48", "Variable import correctness"))
453 testsPassed[t]++;
454 }
455 }
456};
457TestVariableImportCorrectness testVariableImportCorrectness;
458

Callers

nothing calls this directly

Calls 4

nullcTerminateFunction · 0.85
nullcInitFunction · 0.85
evalFunction · 0.85
nullcInitDynamicModuleFunction · 0.50

Tested by

no test coverage detected