diff options
Diffstat (limited to 'testes/gc.lua')
-rw-r--r-- | testes/gc.lua | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/testes/gc.lua b/testes/gc.lua index 03093e34..3c928d7c 100644 --- a/testes/gc.lua +++ b/testes/gc.lua | |||
@@ -460,10 +460,7 @@ do -- tests for string keys in weak tables | |||
460 | a[string.rep("a", 2^22)] = 25 -- long string key -> number value | 460 | a[string.rep("a", 2^22)] = 25 -- long string key -> number value |
461 | a[string.rep("b", 2^22)] = {} -- long string key -> colectable value | 461 | a[string.rep("b", 2^22)] = {} -- long string key -> colectable value |
462 | a[{}] = 14 -- colectable key | 462 | a[{}] = 14 -- colectable key |
463 | assert(collectgarbage("count") > m + 2^13) -- 2^13 == 2 * 2^22 in KB | ||
464 | collectgarbage() | 463 | collectgarbage() |
465 | assert(collectgarbage("count") >= m + 2^12 and | ||
466 | collectgarbage("count") < m + 2^13) -- one key was collected | ||
467 | local k, v = next(a) -- string key with number value preserved | 464 | local k, v = next(a) -- string key with number value preserved |
468 | assert(k == string.rep("a", 2^22) and v == 25) | 465 | assert(k == string.rep("a", 2^22) and v == 25) |
469 | assert(next(a, k) == nil) -- everything else cleared | 466 | assert(next(a, k) == nil) -- everything else cleared |