Skip to content

Instantly share code, notes, and snippets.

Created December 12, 2012 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4267814 to your computer and use it in GitHub Desktop.
Save anonymous/4267814 to your computer and use it in GitHub Desktop.
#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();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment