Skip to content

Commit

Permalink
Fix missing args in test for flexbuffers_binary_to_json
Browse files Browse the repository at this point in the history
  • Loading branch information
aardappel committed Jun 15, 2023
1 parent 48d04d6 commit 64c5940
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/misctest.lobster
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ run_test("misc"):
let groundv = parsetest { true, 1, 1.0, xyz { 0.0, 0.0, 0.0 }, "", [], nil, 0 }
assert equal(parsed, groundv)
let flex = flexbuffers_value_to_binary(parsed)
let json = flexbuffers_binary_to_json(flex)
let json = flexbuffers_binary_to_json(flex, false, "")
assert json
// Fields that are nil or scalar default value should be missing!
let groundj = """{ a: 1, b: 1.0, d: "", e: [ ], h: 1 }"""
assert json == groundj
let flex2, ferr = flexbuffers_json_to_binary(json)
assert not ferr
let json2 = flexbuffers_binary_to_json(flex2)
let json2 = flexbuffers_binary_to_json(flex2, false, "")
assert json2
assert json2 == groundj
let fval, fverr = flexbuffers_binary_to_value(typeof direct, flex2)
Expand Down

0 comments on commit 64c5940

Please sign in to comment.