From 68f96b225c4da758a87a90f5723025be7b2fafc1 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Thu, 25 Jul 2019 19:15:32 +0800 Subject: add binary mode --- tests/modules/string/serialize/test.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/modules/string') diff --git a/tests/modules/string/serialize/test.lua b/tests/modules/string/serialize/test.lua index a85868e7e..1ab3852ba 100644 --- a/tests/modules/string/serialize/test.lua +++ b/tests/modules/string/serialize/test.lua @@ -1,6 +1,9 @@ -function roundtrip(v) - return string.serialize(v):deserialize() +function roundtrip(round0) + local round1 = string.serialize(round0, false):deserialize() + local round2 = string.serialize(round1, true):deserialize() + local round3 = string.serialize(round2, {binary=true}):deserialize() + return round3 end function test_number(t) -- cgit v1.3.1