tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

invalid-rank.https.any.js (506B)


      1 // META: title=ensure an MLOperand cannot be created with an invalid rank
      2 // META: global=window,worker
      3 // META: variant=?cpu
      4 // META: variant=?gpu
      5 // META: variant=?npu
      6 // META: script=../resources/utils_validation.js
      7 
      8 promise_test(async t => {
      9  const builder = new MLGraphBuilder(context);
     10 
     11  const shapeWithLargeRank = Array(10).fill(2);
     12  assert_throws_js(
     13      TypeError,
     14      () =>
     15          builder.input('a', {dataType: 'float32', shape: shapeWithLargeRank}));
     16 }, 'Throw if rank is too large');