Main SYNX site: https://synx.aperturesyndicate.com/
A set of .synx input files and their expected JSON outputs. Any compliant SYNX parser must produce byte-identical JSON for every case.
tests/conformance/
├── README.md
└── cases/
├── 001-scalar-types.synx
├── 001-scalar-types.expected.json
├── 002-nested-objects.synx
├── 002-nested-objects.expected.json
├── ...
└── 010-tool-mode.synx / .expected.json
- Parse the
.synxfile. If it starts with!tool, useparse_toolinstead ofparse. - Serialize the result to JSON with keys sorted alphabetically at every nesting level.
- Compare the JSON string byte-for-byte against the
.expected.jsonfile (trailing newline stripped).
Numbers: 42 is an integer, 3.14 is a float. true/false/null are their JSON equivalents.
cargo test -p synx-core --test conformancefor f in tests/conformance/cases/*.synx; do
expected="${f%.synx}.expected.json"
[ -f "$expected" ] || continue
got=$(synx parse "$f")
want=$(cat "$expected" | tr -d '\n')
if [ "$got" = "$want" ]; then
echo "PASS $(basename $f)"
else
echo "FAIL $(basename $f)"
echo " got: $got"
echo " want: $want"
fi
done- Create
NNN-descriptive-name.synxincases/. - Create the matching
.expected.jsonwith sorted keys, no trailing whitespace, and a single trailing newline. - Run
cargo test -p synx-core --test conformanceto verify.
The numbering convention: 001–099 basic syntax, 100–199 active mode, 200+ edge cases.