added files for running tests

This commit is contained in:
Phuntsok Drak-pa
2019-03-27 14:31:25 +01:00
parent 99c815a561
commit 02702874f6
3 changed files with 23 additions and 1 deletions

16
tests/tests.cc Normal file
View File

@@ -0,0 +1,16 @@
#include <gtest/gtest.h>
TEST(SquareRootTest, PositiveNos) {
ASSERT_EQ(6, 2 * 3);
ASSERT_EQ(6, -2 * -3);
}
TEST(SquareRootTest, NegativeNos) {
ASSERT_EQ(-6, -2 * 3);
ASSERT_EQ(-6, 2 * -3);
}
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}