????????????google test
???????????? ???????[ 2013/10/11 16:36:33 ] ????????
????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???д????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11