3.5 KiB
3.5 KiB
Test vectors
Inputs and the exact outputs every implementation must compute.
Each file holds one case per line, in canonical JSON, with an id, its inputs, and its expected outputs, usually under expect.
Run them in your own test suite; docs/examples.md shows the shape of a harness.
| File | Tests | Chapter |
|---|---|---|
canonical-json.jsonl |
input_json, parsed with every number as an IEEE 754 double, and its canonical output. |
1.1 |
normalize.jsonl |
Normalization for hashing, and the SHA-256 of the result. | 1.4 |
ids.jsonl |
Minting payloads and node IDs, and letter-first encodings of digests. | 4 |
notation.jsonl |
Each math source's canonical linear form, or null when it is complex. | 5.4 |
projections.jsonl |
One-sentence runs: plain, normalized, strict and lossy projections, complex keys and the three text values. | 5.3 |
projection-groups.jsonl |
Which cases must share, or must differ in, a value: H₂O in six spellings, cm⁻¹, 10⁻³, K_r, ligatures, the micro sign, "103" against 10³. | 5.3 |
offsets.jsonl |
Code-point spans and their UTF-16 equivalents. | 1.5 |
hashes.jsonl |
Every node of a small document, its own content and its five values. | 5.1 |
addresses.jsonl |
How addresses parse; null for invalid ones. | 6.1 |
keyed.jsonl |
The team key and its ID, an HMAC, page hashes, a page-derived key, and what someone without the paper cannot check. | 5.8 |
fingerprints.jsonl |
Pages as text lines, the stamp rules that fired, and the fingerprint; two downloads that must agree, and a change that must not. | 7.1 |
merkle.jsonl |
Receipt items and their Merkle roots. | 8.5 |
signatures.jsonl |
The RFC 8032 test vector, and a receipt's record hash, signing payload and signature. | 8.4 |
spotcheck.jsonl |
Seed payloads, seeds, sample sizes and samples. | 8.8 |
bounds.jsonl |
Reviewer error bounds as reported. | 8.9 |
alignment.jsonl |
Two readings of a document, their pairs and their suspects. | 5.6 |
corrections.jsonl |
Each operation and refusal on a small document: the state before, the correction, and the record and state after, or the rule broken. | 11 |
resolve.jsonl |
Anchors made on the example paper's first reading, and how each resolves after its corrections. | 6.5 |
rights.jsonl |
Stage checks with policies and expiry, the combining rule, and backend conditions. | 14 |
grading.jsonl |
Exercises, submissions and the grades they earn. | 19.4 |
Vectors that refer to a package (resolve.jsonl and grading.jsonl) name it by path; resolve against the files in that package, not against anything else.