]> git.sesse.net Git - ffmpeg/commitdiff
dnn-layer-mathbinary-test: add unit test for 'mul'
authorGuo, Yejun <yejun.guo@intel.com>
Sat, 11 Apr 2020 05:24:36 +0000 (13:24 +0800)
committerGuo, Yejun <yejun.guo@intel.com>
Wed, 22 Apr 2020 05:14:55 +0000 (13:14 +0800)
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
tests/dnn/dnn-layer-mathbinary-test.c

index fd8037fca0f01e3d23d9f00ca79e114471ab6052..3b0f0c5a2e0e40ee3a53f8ad2eba4f3f990d0dca 100644 (file)
@@ -34,6 +34,8 @@ static float get_expected(float f1, float f2, DNNMathBinaryOperation op)
         return f1 - f2;
     case DMBO_ADD:
         return f1 + f2;
+    case DMBO_MUL:
+        return f1 * f2;
     default:
         av_assert0(!"not supported yet");
         return 0.f;
@@ -190,5 +192,8 @@ int main(int argc, char **argv)
     if (test(DMBO_ADD))
         return 1;
 
+    if (test(DMBO_MUL))
+        return 1;
+
     return 0;
 }