change cmakelists and gitignore, commit third librarys source
This commit is contained in:
9
test/main_test.cc
Normal file
9
test/main_test.cc
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
|
||||
int main(int argc, char **const argv){
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
||||
|
||||
11
test/util_test.cc
Normal file
11
test/util_test.cc
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "UtilTool.h"
|
||||
|
||||
TEST(UtilTest, CheckIsImageTestShouldTrue) {
|
||||
EXPECT_EQ(UtilTool::CheckFileIsImage("test.jpg"), true);
|
||||
EXPECT_EQ(UtilTool::CheckFileIsImage("test.png"), true);
|
||||
}
|
||||
TEST(UtilTest, CheckIsImageTestShouldFalse) {
|
||||
EXPECT_EQ(UtilTool::CheckFileIsImage("test.mp4"), false);
|
||||
EXPECT_EQ(UtilTool::CheckFileIsImage("test.wav"), false);
|
||||
}
|
||||
Reference in New Issue
Block a user