mirror of
https://github.com/encounter/cpp3ds.git
synced 2026-03-30 11:04:22 -07:00
Basic unit testing setup.
This commit is contained in:
+16
@@ -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
|
||||
@@ -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
@@ -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
|
||||
Reference in New Issue
Block a user