mirror of
https://github.com/nlohmann/json.git
synced 2025-07-31 10:24:23 +03:00
✅ added roundtrip tests for UBJSON
This commit is contained in:
2
test/data/json.org/1.json.ubjson
Normal file
2
test/data/json.org/1.json.ubjson
Normal file
@ -0,0 +1,2 @@
|
||||
{iglossary{iGlossDiv{i GlossList{i
|
||||
GlossEntry{iAbbrevSi
|
2
test/data/json.org/2.json.ubjson
Normal file
2
test/data/json.org/2.json.ubjson
Normal file
@ -0,0 +1,2 @@
|
||||
{imenu{iidSifileipopup{imenuitem[{ionclickSiCreateNewDoc()ivalueSiNew}{ionclickSi OpenDoc()ivalueSiOpen}{ionclickSi
|
||||
CloseDoc()ivalueSiClose}]}ivalueSiFile}}
|
2
test/data/json.org/3.json.ubjson
Normal file
2
test/data/json.org/3.json.ubjson
Normal file
@ -0,0 +1,2 @@
|
||||
{iwidget{idebugSioniimage{i alignmentSicenterihOffsetU<74>inameSisun1isrcSiImages/Sun.pngivOffsetU<74>}itext{i alignmentSicenteridataSi
|
||||
Click HereihOffsetU<74>inameSitext1i onMouseUpSi)sun1.opacity = (sun1.opacity / 100) * 90;isizei$istyleSiboldivOffsetid}iwindow{iheightI<01>inameSimain_windowititleSiSample Konfabulator WidgetiwidthI<01>}}}
|
BIN
test/data/json.org/4.json.ubjson
Normal file
BIN
test/data/json.org/4.json.ubjson
Normal file
Binary file not shown.
5
test/data/json.org/5.json.ubjson
Normal file
5
test/data/json.org/5.json.ubjson
Normal file
@ -0,0 +1,5 @@
|
||||
{imenu{iheaderSi
|
||||
SVG Vieweriitems[{iidSiOpen}{iidSiOpenNewilabelSiOpen New}Z{iidSiZoomInilabelSiZoom In}{iidSiZoomOutilabelSiZoom Out}{iidSiOriginalViewilabelSi
|
||||
Original View}Z{iidSiQuality}{iidSiPause}{iidSiMute}Z{iidSiFindilabelSiFind...}{iidSi FindAgainilabelSi
|
||||
Find Again}{iidSiCopy}{iidSi CopyAgainilabelSi
|
||||
Copy Again}{iidSiCopySVGilabelSiCopy SVG}{iidSiViewSVGilabelSiView SVG}{iidSi
|
BIN
test/data/json_nlohmann_tests/all_unicode.json.ubjson
Normal file
BIN
test/data/json_nlohmann_tests/all_unicode.json.ubjson
Normal file
Binary file not shown.
BIN
test/data/json_tests/pass1.json.ubjson
Normal file
BIN
test/data/json_tests/pass1.json.ubjson
Normal file
Binary file not shown.
1
test/data/json_tests/pass2.json.ubjson
Normal file
1
test/data/json_tests/pass2.json.ubjson
Normal file
@ -0,0 +1 @@
|
||||
[[[[[[[[[[[[[[[[[[[SiNot too deep]]]]]]]]]]]]]]]]]]]
|
1
test/data/json_tests/pass3.json.ubjson
Normal file
1
test/data/json_tests/pass3.json.ubjson
Normal file
@ -0,0 +1 @@
|
||||
{iJSON Test Pattern pass3{iIn this testSiIt is an object.iThe outermost valueSimust be an object or array.}}
|
BIN
test/data/json_testsuite/sample.json.ubjson
Normal file
BIN
test/data/json_testsuite/sample.json.ubjson
Normal file
Binary file not shown.
@ -2111,6 +2111,12 @@ TEST_CASE("UBJSON roundtrips", "[hide]")
|
||||
{
|
||||
for (std::string filename :
|
||||
{
|
||||
"test/data/json_nlohmann_tests/all_unicode.json",
|
||||
"test/data/json.org/1.json",
|
||||
"test/data/json.org/2.json",
|
||||
"test/data/json.org/3.json",
|
||||
"test/data/json.org/4.json",
|
||||
"test/data/json.org/5.json",
|
||||
"test/data/json_roundtrip/roundtrip01.json",
|
||||
"test/data/json_roundtrip/roundtrip02.json",
|
||||
"test/data/json_roundtrip/roundtrip03.json",
|
||||
@ -2142,7 +2148,11 @@ TEST_CASE("UBJSON roundtrips", "[hide]")
|
||||
"test/data/json_roundtrip/roundtrip29.json",
|
||||
"test/data/json_roundtrip/roundtrip30.json",
|
||||
"test/data/json_roundtrip/roundtrip31.json",
|
||||
"test/data/json_roundtrip/roundtrip32.json"
|
||||
"test/data/json_roundtrip/roundtrip32.json",
|
||||
"test/data/json_testsuite/sample.json",
|
||||
"test/data/json_tests/pass1.json",
|
||||
"test/data/json_tests/pass2.json",
|
||||
"test/data/json_tests/pass3.json"
|
||||
})
|
||||
{
|
||||
CAPTURE(filename);
|
||||
|
Reference in New Issue
Block a user