????3?????????
#g++ -g test_foo_cpp -o test_foo
#-I../gtest-1.7.0/include
#../gtest-1.7.0/lib/.libs/libgtest.a
#../gtest-1.7.0/lib/.libs/libgtest_main.a
#-lpthread
???????????????????????test_foo????н?????£?
????4?????????
??????1????TEST???д????????
????gtest????TEST??????д????????????????????????????????????????????????????????????????????????
??????A????????????????????????????????????????????????
??????B????????????????????????????????????????
??????C?????????????????????????????????????????
???????????test_foo.cpp?е?TEST(foo?? max)??????(C)????????
??????2????EXPECT_*/ASSERT_*?????ü???
????gtest????????EXPECT_*??ASSERT_*????????????????ü?????м?飬EXPECT??к?ASSERT??к???????????
??????A??EXPECT_*????????????????????С?
??????B??ASSERT_*??????????????????з?????????????ASSERT_*???????佫??????С?
???????????TEST(foo?? max)?????е????EXPECT_EQ(2?? max(2?? 1))???????max(2?? 1)????н????????2????????????????????????????????
??????3???????????????????????
????gtest????????????????????????в?????????Щ????????????????main?????е???::testing::InitGoogleTest(&argc?? argv)????????Щ??????????
??????4?????в???????
??????????????????????????в???????????????????gtest????RUN_ALL_TEST()?????????????TEST???д????????????????????