diff options
| author | thecharlesblake | 2017-10-05 00:04:52 +0100 |
|---|---|---|
| committer | thecharlesblake | 2017-10-13 18:46:14 +0100 |
| commit | 33f3a5e1a340a96d2481d2ef62d12bb26fa8d1bb (patch) | |
| tree | ff4939bbb8cab80f413697dbda84724d30dfc372 /src/test/main_test.cpp | |
| parent | Add release as well as debug build (diff) | |
| download | metasol-33f3a5e1a340a96d2481d2ef62d12bb26fa8d1bb.tar.gz metasol-33f3a5e1a340a96d2481d2ef62d12bb26fa8d1bb.zip | |
Add GTest library to build and basic unit tests
Diffstat (limited to 'src/test/main_test.cpp')
| -rw-r--r-- | src/test/main_test.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
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); + } +} |
