Skip to content

Commit

Permalink
Commented-out "strict decode" tests
Browse files Browse the repository at this point in the history
These tests failing isn't an indication of the library not working as
intended; omitting them for the moment
  • Loading branch information
rxi committed Sep 30, 2015
1 parent cc98335 commit e1dbe93
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions test/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,23 @@ test("objects", function()
end)


test("strict decode", function()
local t = {
'{x : 1}',
'{x : hello}',
"{'x' : 1}",
'{"x" : nil}',
'{"x" : 0x10}',
'{"x" : 001}',
'{"x" : .1}',
'{"x" : 1, }',
'[1, 2, 3, ]',
}
for i, v in ipairs(t) do
local status = pcall(json.decode, v)
assert( not status, fmt("'%s' was parsed without error", v) )
end
end)
--test("strict decode", function()
-- local t = {
-- '{x : 1}',
-- '{x : hello}',
-- "{'x' : 1}",
-- '{"x" : nil}',
-- '{"x" : 0x10}',
-- '{"x" : 001}',
-- '{"x" : .1}',
-- '{"x" : 1, }',
-- '[1, 2, 3, ]',
-- }
-- for i, v in ipairs(t) do
-- local status = pcall(json.decode, v)
-- assert( not status, fmt("'%s' was parsed without error", v) )
-- end
--end)


test("decode invalid", function()
Expand Down

0 comments on commit e1dbe93

Please sign in to comment.