Skip to content

Commit

Permalink
tests for other trackers initialization
Browse files Browse the repository at this point in the history
- test for manager shutdown
  • Loading branch information
kalwalt committed Oct 25, 2023
1 parent 794e269 commit 4eb21da
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion tests/webarkit_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,37 @@ TEST(WebARKitConfigTest, TestBlurSize) {
}

// Check WebARKitManager initialisation.
TEST(WebARKitTest, InitialiseBaseTest) {
TEST(WebARKitTest, InitialiseBaseAkazeTest) {
// Create a WebARKitManager object
webarkit::WebARKitManager manager;
// Check if the WebARKitManager initialisation is successful
EXPECT_TRUE(manager.initialiseBase(webarkit::TRACKER_TYPE::AKAZE_TRACKER));
}

// Check WebARKitManager initialisation.
TEST(WebARKitTest, InitialiseBaseFreakTest) {
// Create a WebARKitManager object
webarkit::WebARKitManager manager;
// Check if the WebARKitManager initialisation is successful
EXPECT_TRUE(manager.initialiseBase(webarkit::TRACKER_TYPE::FREAK_TRACKER));
}

// Check WebARKitManager initialisation.
TEST(WebARKitTest, InitialiseBaseOrbTest) {
// Create a WebARKitManager object
webarkit::WebARKitManager manager;
// Check if the WebARKitManager initialisation is successful
EXPECT_TRUE(manager.initialiseBase(webarkit::TRACKER_TYPE::ORB_TRACKER));
}

// Check WebARKitManager initialisation.
TEST(WebARKitTest, InitialiseBaseTeblidTest) {
// Create a WebARKitManager object
webarkit::WebARKitManager manager;
// Check if the WebARKitManager initialisation is successful
EXPECT_TRUE(manager.initialiseBase(webarkit::TRACKER_TYPE::TEBLID_TRACKER));
}

// Check WebARKit version
TEST(WebARKitTest, CheckWebARKitVersion) {
// Create a WebARKitManager object
Expand Down Expand Up @@ -104,4 +128,14 @@ TEST(WebARKitTest, InitTrackerTest) {
EXPECT_EQ(image.rows, 2048);
// Check if initTracker returns sucessfully
EXPECT_TRUE(manager.initTracker(data, width, height));
}

// Check WebARKit version
TEST(WebARKitTest, CheckShutDown) {
// Create a WebARKitManager object
webarkit::WebARKitManager manager;
// Init the manager with the Akaze tracker
manager.initialiseBase(webarkit::TRACKER_TYPE::AKAZE_TRACKER);
// Check if the WebARKit went down successfully
EXPECT_TRUE(manager.shutdown());
}

0 comments on commit 4eb21da

Please sign in to comment.