Introduce GoogleTest C++ unit testing framework
This commit is contained in:
19
tests/src/test1.cpp
Normal file
19
tests/src/test1.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
TEST(FirstSuite, FirstTest){
|
||||
EXPECT_NE(1, 1) << "are in fact equal";
|
||||
}
|
||||
|
||||
TEST(FirstSuite, SecondTest){
|
||||
EXPECT_EQ(1, 2) << "not equal";
|
||||
}
|
||||
|
||||
TEST(FirstSuite, ThirdTest){
|
||||
ASSERT_STREQ("A", "A") << "str not equal";
|
||||
}
|
||||
TEST(FirstSuite,FifthTest){
|
||||
ASSERT_STRNE("am", "am") << "str equal";
|
||||
}
|
||||
TEST(FirstSuite, FourthTest){
|
||||
ASSERT_STREQ("am", "A") << "str not equal";
|
||||
}
|
||||
Reference in New Issue
Block a user