Skip to content

Commit cf48cee

Browse files
myungjoojaeyun-jung
authored andcommitted
test: servicedb c99-designator fix follow-up
As this removal of enum index is itching, I've added an assurance. Related to #30 Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
1 parent bd0fa62 commit cf48cee

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/daemon/unittest_service_db.cc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,24 @@ TEST (serviceDBNotInitalized, delete_resource_n)
675675
}
676676
}
677677

678+
extern
679+
const char *g_mlsvc_table_schema_v1; /* from service-db.cc */
680+
/**
681+
* @brief Test g_mlsvc_table_schema_v1 index correctness
682+
*/
683+
TEST (serviceDBtablelist, declaration_index_check_p)
684+
{
685+
EXPECT_THAT (g_mlsvc_table_schema_v1[TBL_DB_INFO],
686+
testing::StartsWith("tblMLDBInfo"));
687+
EXPECT_THAT (g_mlsvc_table_schema_v1[TBL_PIPELINE_DESCRIPTION],
688+
testing::StartsWith("tblPipeline"));
689+
EXPECT_THAT (g_mlsvc_table_schema_v1[TBL_MODEL_INFO],
690+
testing::StartsWith("tblModel"));
691+
EXPECT_THAT (g_mlsvc_table_schema_v1[TBL_RESOURCE_INFO],
692+
testing::StartsWith("tblResource"));
693+
EXPECT_EQ (g_mlsvc_table_schema_v1[TBL_MAX], nullptr);
694+
}
695+
678696
/**
679697
* @brief Negative test for service-db util. Invalid param case.
680698
*/

0 commit comments

Comments
 (0)