Added control messages to warnings
Added the concept of control messages to the warning system, plus the implementation of the controls "@on"/"@off" to turn warnings on/off. Moreover, the warning system in the test library adds some other controls to ease the test of warnings.
This commit is contained in:
@@ -977,6 +977,7 @@ assert(t[7] == nil)
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
do -- testing errors during GC
|
||||
warn("@off")
|
||||
collectgarbage("stop")
|
||||
local a = {}
|
||||
for i=1,20 do
|
||||
@@ -994,6 +995,7 @@ do -- testing errors during GC
|
||||
collectgarbage()
|
||||
assert(A == 10) -- number of normal collections
|
||||
collectgarbage("restart")
|
||||
warn("@on")
|
||||
end
|
||||
-------------------------------------------------------------------------
|
||||
-- test for userdata vals
|
||||
|
||||
Reference in New Issue
Block a user