Basic unit testing setup.

This commit is contained in:
Cruel
2014-02-06 23:13:00 -05:00
parent c41f247bf9
commit df3bd9ca41
3 changed files with 33 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
language: cpp
compiler:
- gcc
before_install:
- sudo apt-get update
- sudo apt-get install libgtest-dev
- "cd /usr/src/gtest && sudo cmake . && sudo cmake --build . && sudo mv libg* /usr/local/lib/ ; cd -"
script: "cd test && ./run.sh"
notifications:
recipients:
- machin3@gmail.com
email:
on_success: change
on_failure: always
rvm:
- 1.00
+10
View File
@@ -0,0 +1,10 @@
#include "gtest/gtest.h"
TEST(Test, EqualityCheck){
EXPECT_EQ(true, false);
}
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Executable
+7
View File
@@ -0,0 +1,7 @@
echo "Compiling unit tests..."
g++ main.cpp -lgtest -std=c++11 -o test
echo "Running unit tests..."
./test -v
result=$?
echo "Unit tests completed. Result: $result"
exit $result