summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webnn/validation_tests/triangular.https.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/webnn/validation_tests/triangular.https.any.js')
-rw-r--r--testing/web-platform/tests/webnn/validation_tests/triangular.https.any.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/validation_tests/triangular.https.any.js b/testing/web-platform/tests/webnn/validation_tests/triangular.https.any.js
new file mode 100644
index 0000000000..4e4c368f82
--- /dev/null
+++ b/testing/web-platform/tests/webnn/validation_tests/triangular.https.any.js
@@ -0,0 +1,16 @@
+// META: title=validation tests for WebNN API triangular operation
+// META: global=window,dedicatedworker
+// META: script=../resources/utils_validation.js
+// META: timeout=long
+
+'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");