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.
How runValidation Works
A baseline args object is built from each spec's "baseline" field (scalars
used as-is, arrays wrapped as Float32Array). float32array 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.How runValidation Works
A baseline args object is built from each spec's
"baseline"field (scalars used as-is, arrays wrapped asFloat32Array).float32arrayparams 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.