summaryrefslogtreecommitdiff
path: root/tests/test_utils
diff options
context:
space:
mode:
authorruki <[email protected]>2019-07-26 09:23:24 +0800
committerGitHub <[email protected]>2019-07-26 09:23:24 +0800
commita77e8ad6db511c7adbb6b982cd5958febcb989cf (patch)
tree1fccf65b87e1d1ae89390d2292855fdd3c7deb2d /tests/test_utils
parentb03883547d69d2173ffc46f2c8b9e4d579247a60 (diff)
parent7d4023cf698bff82b2c0f2b4aad86286d4890b49 (diff)
Merge pull request #509 from OpportunityLiu/dev
Improve string.serialize; add unit test
Diffstat (limited to 'tests/test_utils')
-rw-r--r--tests/test_utils/check.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_utils/check.lua b/tests/test_utils/check.lua
index bc9ddb6b6..86fa5d6b5 100644
--- a/tests/test_utils/check.lua
+++ b/tests/test_utils/check.lua
@@ -13,6 +13,9 @@ function _get_rep(value)
end
function same(actual, expacted)
+ if actual ~= actual and expacted ~= expacted then
+ return true, _get_rep(actual), _get_rep(expacted)
+ end
return actual == expacted, _get_rep(actual), _get_rep(expacted)
end