From ff63e581e0342838a516451cbf9386dffc2aaa79 Mon Sep 17 00:00:00 2001 From: Yongjoo Ahn Date: Mon, 11 Sep 2023 17:02:48 +0900 Subject: [PATCH] [test] Fix the rank compare test of SNPE filter - Deal with the recent rank update in nnstreamer. Signed-off-by: Yongjoo Ahn --- tests/nnstreamer_filter_snpe/unittest_filter_snpe.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/nnstreamer_filter_snpe/unittest_filter_snpe.cc b/tests/nnstreamer_filter_snpe/unittest_filter_snpe.cc index 2ae0274..10e35c0 100644 --- a/tests/nnstreamer_filter_snpe/unittest_filter_snpe.cc +++ b/tests/nnstreamer_filter_snpe/unittest_filter_snpe.cc @@ -80,18 +80,17 @@ TEST (nnstreamerFilterSnpe, getModelInfo00) EXPECT_EQ (ret, 0); EXPECT_EQ (in_info.num_tensors, 1U); - EXPECT_EQ (in_info.info[0].dimension[0], 1U); - EXPECT_EQ (in_info.info[0].dimension[1], 1U); - EXPECT_EQ (in_info.info[0].dimension[2], 1U); - EXPECT_EQ (in_info.info[0].dimension[3], 1U); EXPECT_EQ (in_info.info[0].type, _NNS_FLOAT32); + EXPECT_EQ (in_info.info[0].dimension[0], 1U); + for (int i = 1; i < NNS_TENSOR_RANK_LIMIT; ++i) + EXPECT_EQ (in_info.info[0].dimension[i], 0U); EXPECT_EQ (out_info.num_tensors, 1U); - EXPECT_EQ (out_info.info[0].dimension[0], 1U); - EXPECT_EQ (out_info.info[0].dimension[1], 1U); - EXPECT_EQ (out_info.info[0].dimension[2], 1U); - EXPECT_EQ (out_info.info[0].dimension[3], 1U); EXPECT_EQ (out_info.info[0].type, _NNS_FLOAT32); + EXPECT_EQ (out_info.info[0].dimension[0], 1U); + for (int i = 1; i < NNS_TENSOR_RANK_LIMIT; ++i) + EXPECT_EQ (out_info.info[0].dimension[i], 0U); + sp->close (&prop, &data); gst_tensors_info_free (&in_info); -- 2.7.4