summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo, Yejun <yejun.guo@intel.com>2020-04-11 13:50:32 +0800
committerGuo, Yejun <yejun.guo@intel.com>2020-04-22 13:15:09 +0800
commit2e38c63630c29ee7024edc4f01d888802fb7b641 (patch)
treee476531ae31be502a79677ce2c4d5a421ccb6652
parent8ce9d88f930cecd55eb73ea5e8ce749090002aa8 (diff)
dnn-layer-mathbinary-test: add unit test for divide
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
-rw-r--r--tests/dnn/dnn-layer-mathbinary-test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/dnn/dnn-layer-mathbinary-test.c b/tests/dnn/dnn-layer-mathbinary-test.c
index 3b0f0c5a2e..f82d15b14c 100644
--- a/tests/dnn/dnn-layer-mathbinary-test.c
+++ b/tests/dnn/dnn-layer-mathbinary-test.c
@@ -36,6 +36,8 @@ static float get_expected(float f1, float f2, DNNMathBinaryOperation op)
return f1 + f2;
case DMBO_MUL:
return f1 * f2;
+ case DMBO_REALDIV:
+ return f1 / f2;
default:
av_assert0(!"not supported yet");
return 0.f;
@@ -195,5 +197,8 @@ int main(int argc, char **argv)
if (test(DMBO_MUL))
return 1;
+ if (test(DMBO_REALDIV))
+ return 1;
+
return 0;
}