Open canxcao opened 6 years ago
I tried the chromium nightly build 313c1c2, most negative tests passed except for the following case:
Steps:
Run https://brucedai.github.io/nt/test/index-local.html?backend=nnapi, check the tests in #addOperand API
:
Test Env: Chromium Version : nightly build 65.0.3324.0 (revision f9e1a31) OS : Android 8.1.0;Pixel 2
Expected Result: Pass an invalid argument to addOperand(), it should throw an exception
Actual Result: No exception is thrown when passing an invalid argument to addOperand()
How to reproduce: Pass the following invalid arguments to addOperand():
TENSOR_FLOAT32 type: no "dimensions" TENSOR_INT32 type: no "dimensions" TENSOR_QUANT8_ASYMM type: no "dimensions" TENSOR_QUANT8_ASYMM type: no "scale" TENSOR_QUANT8_ASYMM type: no "zeroPoint" TENSOR_QUANT8_ASYMM type: no "scale" and "zeroPoint" TENSOR_QUANT8_ASYMM type: "zeroPoint" < 0 TENSOR_QUANT8_ASYMM type: "zeroPoint" > 255 TENSOR_QUANT8_ASYMM type: "scale" is negative addOperand() only requires one argument, passing two arguments should raise an error: two scalars or two tensors For example: 1.TENSOR_FLOAT32 type: no "dimensions":
2.addOperand() only requires one argument, passing two arguments should raise an error: pass two scalars