| 459 | struct 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 | }; |
| 482 | TestGCGlobalLimit testGCGlobalLimit; |
| 483 |
nothing calls this directly
no test coverage detected