Skip to content

Commit

Permalink
tests for enums
Browse files Browse the repository at this point in the history
  • Loading branch information
kalwalt committed Oct 24, 2023
1 parent a8979bd commit c17486d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/webarkit_test.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#include <gtest/gtest.h>
#include <WebARKitManager.h>
#include <WebARKitTrackers/WebARKitOpticalTracking/WebARKitEnums.h>

class WebARKitEnumTest : public testing::TestWithParam<webarkit::TRACKER_TYPE> {};

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) {
Expand Down

0 comments on commit c17486d

Please sign in to comment.