Introduce GoogleTest C++ unit testing framework

This commit is contained in:
berniev
2022-11-18 13:42:57 +10:00
committed by wwmayer
parent a35ab02861
commit edd6bb53de
240 changed files with 108882 additions and 0 deletions

19
tests/src/test1.cpp Normal file
View 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";
}