Add test to make sure viewscreen destructors work

develop
lethosor 2020-03-23 00:49:08 -04:00
parent 49fcb29097
commit f9c50a1f0e
1 changed files with 10 additions and 0 deletions

@ -21,3 +21,13 @@ function test.overlappingGlobals()
expect.true_(prev.last < cur.first, "global variable " .. prev.name .. " overlaps global variable " .. cur.name) expect.true_(prev.last < cur.first, "global variable " .. prev.name .. " overlaps global variable " .. cur.name)
end end
end end
function test.viewscreenDtors()
for name, type in pairs(df) do
if name:startswith('viewscreen') then
print('testing', name)
v = type:new()
expect.true_(v:delete(), "destructor returned false: " .. name)
end
end
end