wgblas
    Preparing search index...

    Module tests/helpers/validation

    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.

    {
    "type": "integer" | "float" | "float32array" | "float64array",
    "baseline": 1,
    "dependsOn": ["n"],
    "range": { "min": 1, "max": 4 },
    "invalid": [
    { "value": 0, "error": "must be positive", "label": "zero" },
    { "special": "NaN", "error": "must be integers", "label": "NaN" },
    { "scenario": "tooShort","error": "does not have enough elements","label": "..." }
    ],
    "edge": [
    { "value": 1, "label": "incx=1 contiguous access" }
    ]
    }

    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.

    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.

    loadParam
    matrixShape
    ndArrayLen
    resolveEntry
    resolveParam
    runValidation