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

Method Run

tests/TestStackRealloc.cpp:461–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459struct TestGCGlobalLimit : TestQueue
460{
461 virtual void Run()
462 {
463 nullcTerminate();
464 nullcInit(MODULE_PATH);
465 nullcInitGCModule();
466 nullcSetGlobalMemoryLimit(1024 * 1024);
467
468 const char *testGCGlobalLimit =
469 "import std.gc;\r\n\
470 int[] arr1 = new int[200000];\r\n\
471 arr1 = nullptr;\r\n\
472 int[] arr2 = new int[200000];\r\n\
473 return arr2.size;";
474 for(int t = 0; t < 2; t++)
475 {
476 testsCount[t]++;
477 if(Tests::RunCode(testGCGlobalLimit, t, "200000", "GC collection before global limit exceeded error"))
478 testsPassed[t]++;
479 }
480 }
481};
482TestGCGlobalLimit testGCGlobalLimit;
483

Callers

nothing calls this directly

Calls 4

nullcTerminateFunction · 0.85
nullcInitFunction · 0.85
nullcInitGCModuleFunction · 0.85

Tested by

no test coverage detected