test/filter/lua: update null-input/output death test
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 25 Aug 2023 08:17:16 +0000 (17:17 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Mon, 28 Aug 2023 10:09:38 +0000 (19:09 +0900)
Filter/lua no longer dies for null input/output.
It now returns an error code (C-side) or an exception (C++-side).

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
tests/nnstreamer_filter_lua/unittest_filter_lua.cc

index 06b6ff2..eac2142 100644 (file)
@@ -485,9 +485,9 @@ TEST (nnstreamerFilterLua, invoke01_n)
   output.data = g_malloc (output.size);
   ((float *) input.data)[0] = 10.0;
 
-  /* catching assertion error */
-  EXPECT_DEATH (sp->invoke (NULL, NULL, data, NULL, &output), "");
-  EXPECT_DEATH (sp->invoke (NULL, NULL, data, &input, NULL), "");
+  /* catching exception */
+  EXPECT_NE (sp->invoke (NULL, NULL, data, NULL, &output), 0);
+  EXPECT_NE (sp->invoke (NULL, NULL, data, &input, NULL), 0);
 
   g_free (input.data);
   g_free (output.data);