gtest???????????????????
???????????? ???????[ 2013/11/11 10:18:04 ] ????????
?????????????gtest - ?????У? ????????ASSERT_*??е??????????????????????????????????????????ASSERT_*????????return?????????? ASSERT_*??в????????????void???????????????????????????????????????????????????????gtest?????????????????£?
void Func(int a?? int b)
{
throw "b==0";
EXPECT_EQ(0?? a);
printf("End of Func");
}
TEST(FooTest?? Demo1)
{
Func(5?? 0);
printf("End Call Func(5?? 0)");
}
int _tmain(int argc?? _TCHAR* argv[])
{
testing::GTEST_FLAG(catch_exceptions) = 1;
testing::InitGoogleTest(&argc?? argv);
return RUN_ALL_TESTS();
}
????(?????????printf????????????С?)
????????????????????????????????
????1.????catch_exception???????main???????????????????????????
????2.??????????????????????throw????????????ɡ?
???????????????????????????????????????ο????gtest - ???????gtest??
????????????????????????TEST_F???????????????????????TearDown()???????????TearDown???????????????????С?
????????????????????????????????????????У?????TEST??????????????????????????????????????????????????£?EXPECT_*?? ASSERT_*??t????????????г???????????????????????????????????????????????????????????????Func?????е? EXPECT_EQ????
??????
???·???
??????????????????
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