From f9c50a1f0edeb07d4d096031a7ca42db42fc1eaf Mon Sep 17 00:00:00 2001 From: lethosor Date: Mon, 23 Mar 2020 00:49:08 -0400 Subject: [PATCH] Add test to make sure viewscreen destructors work --- test/library/structures.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/library/structures.lua b/test/library/structures.lua index 62f3cd635..241000a69 100644 --- a/test/library/structures.lua +++ b/test/library/structures.lua @@ -21,3 +21,13 @@ function test.overlappingGlobals() expect.true_(prev.last < cur.first, "global variable " .. prev.name .. " overlaps global variable " .. cur.name) 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