diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/all_tests.cpp | 10 | ||||
| -rw-r--r-- | src/test/main_test.cpp | 19 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/test/all_tests.cpp b/src/test/all_tests.cpp new file mode 100644 index 0000000..7dce333 --- /dev/null +++ b/src/test/all_tests.cpp @@ -0,0 +1,10 @@ +// +// Created by thecharlesblake on 10/4/17. +// + +#include <gtest/gtest.h> + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/src/test/main_test.cpp b/src/test/main_test.cpp new file mode 100644 index 0000000..3f2081f --- /dev/null +++ b/src/test/main_test.cpp @@ -0,0 +1,19 @@ +// +// Created by thecharlesblake on 10/4/17. +// + +#include <gtest/gtest.h> + +const int actualValTrue = 4; +const int actualValFalse = 8; +const int expectVal = 4; + +namespace { + TEST(StrCompare, CStrEqual) { + EXPECT_EQ(expectVal, actualValTrue); + } + + TEST(StrCompare, CStrNotEqual) { + EXPECT_NE(expectVal, actualValFalse); + } +} |
