Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBaiyan Huang <baiyanhuang@gmail.com>2013-07-27 18:57:30 +0400
committerBaiyan Huang <baiyanhuang@gmail.com>2013-07-27 18:57:30 +0400
commitc9d4d4bf2f6daf09447f8fc4f5fae695a5c91cb3 (patch)
treea544891689a259a8b9e14d7598f5df014f0c0c1e /tests
parentfc3d38a1670e9f549a1b60d8290a906b2b2b388e (diff)
Make table.isempty work with table which has a key as false
Diffstat (limited to 'tests')
-rw-r--r--tests/base/test_table.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/base/test_table.lua b/tests/base/test_table.lua
index 2bf26ed..0ac3442 100644
--- a/tests/base/test_table.lua
+++ b/tests/base/test_table.lua
@@ -55,3 +55,11 @@
function suite.isempty_ReturnsFalseOnNotEmpty()
test.isfalse(table.isempty({ 1 }))
end
+
+ function suite.isempty_ReturnsFalseOnNotEmptyMap()
+ test.isfalse(table.isempty({ name = 'premake' }))
+ end
+
+ function suite.isempty_ReturnsFalseOnNotEmptyMapWithFalseKey()
+ test.isfalse(table.isempty({ [false] = 0 }))
+ end