add a test and run test suite

This commit is contained in:
Josh Holtrop 2014-06-03 20:15:43 -04:00
parent 6c2ffa1b60
commit 60e34726ab
2 changed files with 14 additions and 1 deletions

View File

@ -8,6 +8,7 @@ task :default do
sources = Dir["gtest-1.7.0/src/gtest-all.cc", "*.cc"] sources = Dir["gtest-1.7.0/src/gtest-all.cc", "*.cc"]
env.Program("tst", sources) env.Program("tst", sources)
end end
system("./tst")
end end
task :clean do task :clean do

14
main.cc
View File

@ -3,7 +3,19 @@
using namespace std; using namespace std;
class GTestTest : public testing::Test
{
protected:
};
TEST_F(GTestTest, first_test)
{
EXPECT_EQ(4, 4);
EXPECT_EQ(3, 4);
}
int main(int argc, char * argv[]) int main(int argc, char * argv[])
{ {
cout << "hi" << endl; testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
} }