From c17486d7d67052ebbc7560196f32cacbfec5bcd1 Mon Sep 17 00:00:00 2001 From: kalwalt Date: Tue, 24 Oct 2023 13:46:30 +0200 Subject: [PATCH] tests for enums --- tests/webarkit_test.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/webarkit_test.cc b/tests/webarkit_test.cc index 7200f9a..d8eae31 100644 --- a/tests/webarkit_test.cc +++ b/tests/webarkit_test.cc @@ -1,5 +1,21 @@ #include #include +#include + +class WebARKitEnumTest : public testing::TestWithParam {}; + +TEST_P(WebARKitEnumTest, TestEnumValues) { + webarkit::TRACKER_TYPE value = GetParam(); + EXPECT_TRUE(value == webarkit::TRACKER_TYPE::AKAZE_TRACKER || + value == webarkit::TRACKER_TYPE::ORB_TRACKER || + value == webarkit::TRACKER_TYPE::FREAK_TRACKER); +} + +INSTANTIATE_TEST_SUITE_P(WebARKitEnumTestSuite, WebARKitEnumTest, + testing::ValuesIn({webarkit::TRACKER_TYPE::AKAZE_TRACKER, + webarkit::TRACKER_TYPE::ORB_TRACKER, + webarkit::TRACKER_TYPE::FREAK_TRACKER})); + // Check WebARKitManager initialisation. TEST(WebARKitTest, InitialiseBaseTest) {