diff options
Diffstat (limited to 'test.lua')
-rw-r--r-- | test.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test.lua b/test.lua index 3493de4..b2b6f3c 100644 --- a/test.lua +++ b/test.lua @@ -11,6 +11,14 @@ function check(x, msg) end end +function check_nil(x, msg) + if x == nil then + io.write('.') + else + error(msg..'; should be nil but got "'..x..'"') + end +end + function check_eq(x, expected, msg) if eq(x, expected) then io.write('.') |