diff options
Diffstat (limited to 'testes/api.lua')
| -rw-r--r-- | testes/api.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/testes/api.lua b/testes/api.lua index c1bcb4b7..bd85a923 100644 --- a/testes/api.lua +++ b/testes/api.lua | |||
| @@ -804,15 +804,14 @@ F = function (x) | |||
| 804 | d = nil | 804 | d = nil |
| 805 | assert(debug.getmetatable(x).__gc == F) | 805 | assert(debug.getmetatable(x).__gc == F) |
| 806 | assert(load("table.insert({}, {})"))() -- create more garbage | 806 | assert(load("table.insert({}, {})"))() -- create more garbage |
| 807 | collectgarbage() -- force a GC during GC | 807 | assert(not collectgarbage()) -- GC during GC (no op) |
| 808 | assert(debug.getmetatable(x).__gc == F) -- previous GC did not mess this? | ||
| 809 | local dummy = {} -- create more garbage during GC | 808 | local dummy = {} -- create more garbage during GC |
| 810 | if A ~= nil then | 809 | if A ~= nil then |
| 811 | assert(type(A) == "userdata") | 810 | assert(type(A) == "userdata") |
| 812 | assert(T.udataval(A) == B) | 811 | assert(T.udataval(A) == B) |
| 813 | debug.getmetatable(A) -- just access it | 812 | debug.getmetatable(A) -- just access it |
| 814 | end | 813 | end |
| 815 | A = x -- ressucita userdata | 814 | A = x -- ressurect userdata |
| 816 | B = udval | 815 | B = udval |
| 817 | return 1,2,3 | 816 | return 1,2,3 |
| 818 | end | 817 | end |
