Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 3 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /webnn/validation_tests/triangular.https.any.html - WPT Dashboard Interop Dashboard
- /webnn/validation_tests/triangular.https.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=validation tests for WebNN API triangular operation
// META: global=window,dedicatedworker
// META: script=../resources/utils_validation.js
'use strict';
promise_test(async t => {
// The input tensor which is at least 2-D.
for (let dimensions of allWebNNDimensionsArray.slice(0, 2)) {
for (let dataType of allWebNNOperandDataTypes) {
const input = builder.input(`input${++inputIndex}`, {dataType, dimensions});
assert_throws_js(TypeError, () => builder.triangular(input));
}
}
}, "[triangular] DataError is expected if input's rank is less than 2");
validateInputFromAnotherBuilder('triangular');