tests/data: comments: specs only

This commit is contained in:
4DBug committed 2026-11-01 01:51:09 -05:00
1 parent 653ce4e002
commit 7672980c65
12 files changed
+16 -63

No files matched your search

+1 -6
View File
@@ -1,6 +1,4 @@
-- data/json tests: the contract, the format through the API (F.load / F.save / sniffing), JSON Lines, Python's
-- json.dumps corpus through the format, and the fuzz pass. The codec itself is tested in tests/codecs/json.luau.
-- Fixtures: tools/fixtures/json.py.
-- data/json format tests (the codec: tests/codecs/json.luau) against Python's json (tools/fixtures/json.py).
local T = require("@tests/T")
local F = require("@rosetta")
local JsonF = require("@rosetta/data/json")
@@ -27,7 +25,6 @@ for i, c in Corpus do
t:eq(buffer.tostring(b), c.pretty .. "\n", "corpus " .. i .. ": encode")
end
-- through the API: sniffed, by name, saved
do
local v, err = F.load(buffer.fromstring('{"a": [1, 2], "b": null}'))
t:check(v ~= nil, "F.load sniffs json: " .. tostring(err))
@@ -40,7 +37,6 @@ do
t:eq(back.y[1], true, "F.data.load")
end
-- JSON Lines
do
local v = dec('{"a":1}\n{"a":2}\n\n[3]\n', { lines = true })
t:eq(#v, 3, "lines decode count")
@@ -51,7 +47,6 @@ do
t:eq(e and e.code, Err.TRUNCATED, "lines error")
end
-- reader range: the data inside a bigger buffer
do
local big = buffer.fromstring("xx[1,2,3]yy")
local v = JsonF.decode(Bytes.reader(big, 2, 7))