diff options
Diffstat (limited to 'testes/gc.lua')
-rw-r--r-- | testes/gc.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testes/gc.lua b/testes/gc.lua index 6bdc98ca..34854d6f 100644 --- a/testes/gc.lua +++ b/testes/gc.lua | |||
@@ -372,7 +372,7 @@ if T then | |||
372 | warn("@store") | 372 | warn("@store") |
373 | collectgarbage() | 373 | collectgarbage() |
374 | assert(string.find(_WARN, "error in __gc metamethod")) | 374 | assert(string.find(_WARN, "error in __gc metamethod")) |
375 | assert(string.match(_WARN, "@(.-)@") == "expected") | 375 | assert(string.match(_WARN, "@(.-)@") == "expected"); _WARN = nil |
376 | for i = 8, 10 do assert(s[i]) end | 376 | for i = 8, 10 do assert(s[i]) end |
377 | 377 | ||
378 | for i = 1, 5 do | 378 | for i = 1, 5 do |
@@ -481,6 +481,7 @@ if T then | |||
481 | u = setmetatable({}, {__gc = function () error "@expected error" end}) | 481 | u = setmetatable({}, {__gc = function () error "@expected error" end}) |
482 | u = nil | 482 | u = nil |
483 | collectgarbage() | 483 | collectgarbage() |
484 | assert(string.find(_WARN, "@expected error")); _WARN = nil | ||
484 | warn("@normal") | 485 | warn("@normal") |
485 | end | 486 | end |
486 | 487 | ||
@@ -663,9 +664,8 @@ if T then | |||
663 | else | 664 | else |
664 | assert(lastmsg == _WARN) -- subsequent error messages are equal | 665 | assert(lastmsg == _WARN) -- subsequent error messages are equal |
665 | end | 666 | end |
666 | warn("@store") | 667 | warn("@store"); _WARN = nil |
667 | error"@expected warning" | 668 | error"@expected warning" |
668 | warn("@normal") | ||
669 | end} | 669 | end} |
670 | for i = 10, 1, -1 do | 670 | for i = 10, 1, -1 do |
671 | -- create object and preserve it until the end | 671 | -- create object and preserve it until the end |