From 33f3a5e1a340a96d2481d2ef62d12bb26fa8d1bb Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 5 Oct 2017 00:04:52 +0100 Subject: Add GTest library to build and basic unit tests --- src/test/main_test.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/test/main_test.cpp (limited to 'src/test/main_test.cpp') 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 + +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); + } +} -- cgit v1.2.1