[FFmpeg-devel] [PATCH 6/6] dnn-layer-mathbinary-test: add unit test for divide

Guo, Yejun yejun.guo at intel.com
Sat Apr 11 11:40:19 EEST 2020


Signed-off-by: Guo, Yejun <yejun.guo at intel.com>
---
 tests/dnn/dnn-layer-mathbinary-test.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/dnn/dnn-layer-mathbinary-test.c b/tests/dnn/dnn-layer-mathbinary-test.c
index 3b0f0c5..f82d15b 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;
 }
-- 
2.7.4



More information about the ffmpeg-devel mailing list