Validation test runner driven by JSON param specs.
Each routine declares its parameters by calling loadParam(name) which reads
a JSON file from tests/validation/params/. The JSON describes what values
are valid, what values must throw, and boundary cases that must not throw.
runValidation iterates those cases automatically.
Each entry in invalid must cause the routine to throw with a message
containing the specified error string. Each entry in edge must not throw.
The full schema — every type, range shape, special and scenario — is
documented in the tests/validation module.
Double-precision specs aren't stored: loadParam("x64") derives one from
x.json (see derive64).
How runValidation Works
A baseline args object is built from each spec's "baseline" field (scalars
used as-is, arrays built as the spec's typed array — Float32Array,
Float64Array or Complex32Array). Array params without a baseline are
sized automatically via resolveNdArray using dependsOn.
Then for each test case, exactly one param is replaced with the invalid or edge
value while the rest stay at baseline — isolating the parameter under test.
Validation test runner driven by JSON param specs.
Each routine declares its parameters by calling
loadParam(name)which reads a JSON file fromtests/validation/params/. The JSON describes what values are valid, what values must throw, and boundary cases that must not throw.runValidationiterates those cases automatically.Param Spec Format
Each entry in
invalidmust cause the routine to throw with a message containing the specifiederrorstring. Each entry inedgemust not throw. The full schema — everytype,rangeshape, special and scenario — is documented in thetests/validationmodule.Double-precision specs aren't stored:
loadParam("x64")derives one fromx.json(seederive64).How runValidation Works
A baseline args object is built from each spec's
"baseline"field (scalars used as-is, arrays built as the spec's typed array —Float32Array,Float64ArrayorComplex32Array). Array params without a baseline are sized automatically viaresolveNdArrayusingdependsOn. Then for each test case, exactly one param is replaced with the invalid or edge value while the rest stay at baseline — isolating the parameter under test.