summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webnn/validation_tests/triangular.https.any.js
blob: 4e4c368f82bdf2692a8870f147abd1d559a5d923 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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");