Skip to content

Commit

Permalink
Add test/data/json-things.*.json
Browse files Browse the repository at this point in the history
  • Loading branch information
nigeltao committed Feb 21, 2020
1 parent df62fe5 commit 4503f2d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
15 changes: 11 additions & 4 deletions build-all.sh
Expand Up @@ -70,14 +70,21 @@ wuffs test -skipgen -mimic
wuffs bench -skipgen -mimic -reps=1 -iterscale=1

./build-example.sh
LICENSE_CRC32=$(gen/bin/example-crc32 < LICENSE)
if [ "$LICENSE_CRC32" != "1ea3b7b0" ]; then
echo "LICENSE crc32 mismatch"
echo "Running gen/bin/example-crc32"
JSON_THINGS_CRC32=$(gen/bin/example-crc32 < test/data/json-things.formatted.json)
if [ "$JSON_THINGS_CRC32" != "cdcc7e35" ]; then
echo "example-crc32 failed on json-things data"
exit 1
fi
echo "Running gen/bin/example-jsonptr"
JSON_THINGS_CRC32=$(gen/bin/example-jsonptr < test/data/json-things.unformatted.json | gen/bin/example-crc32)
if [ "$JSON_THINGS_CRC32" != "cdcc7e35" ]; then
echo "example-jsonptr failed on json-things data"
exit 1
fi

./build-fuzz.sh
for f in gen/bin/fuzz-*; do
echo "Running $f"
echo "Running $f"
$f test/data > /dev/null
done
12 changes: 12 additions & 0 deletions test/data/json-things.formatted.json
@@ -0,0 +1,12 @@
{
"k0": [
42,
[
false,
true
]
],
"k1": 234.56e+7,
"k二": null,
"k³": "\t\\\n\n"
}
1 change: 1 addition & 0 deletions test/data/json-things.unformatted.json
@@ -0,0 +1 @@
{"k0":[42,[false,true]],"k1": 234.56e+7 ,"\u006b\u4E8C":null, "k³": "\t\\\n\u000a"}

0 comments on commit 4503f2d

Please sign in to comment.