mirror of
https://github.com/TangentFoxy/lume.git
synced 2025-07-28 02:52:21 +00:00
Added support for NaN, inf and -inf to lume.serialize; updated tests
This commit is contained in:
@@ -484,6 +484,10 @@ tests["lume.serialize, lume.deserialize"] = function()
|
||||
local t = { 1, 2, 3, 4, true, false, "cat", "dog", {1, 2, 3} }
|
||||
local s = lume.serialize(t)
|
||||
testeq( lume.deserialize(s), t )
|
||||
testeq( lume.deserialize(lume.serialize(math.huge)), math.huge )
|
||||
testeq( lume.deserialize(lume.serialize(-math.huge)), -math.huge )
|
||||
local x = lume.deserialize(lume.serialize(0 / 0)) -- nan
|
||||
testeq( x ~= x, true )
|
||||
end
|
||||
|
||||
-- lume.split
|
||||
|
Reference in New Issue
Block a user