public
anonymous / gtest
Created

  • Download Gist
gtest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#include <iostream>
#include <gtest/gtest.h>
 
namespace Foo {
 
class SimpleTest: public ::testing::Test {
 
public:
 
SimpleTest() {};
 
virtual ~SimpleTest() {};
 
virtual void SetUp() {
 
};
 
virtual void TearDown() {
 
};
 
};
 
TEST_F(SimpleTest, doesGTestWork) {
EXPECT_EQ(42, 42);
}
 
}
 
int main(int argc, char **argv) {
std::cout << "Hello GTest" << std::endl; // prints Hello GTest
 
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.