?????VS2013?н???Boost???????
???????????? ???????[ 2014/10/20 15:08:42 ] ??????????????? ??????? VS2013
?????????“????”?ù????????tested.obj?????
????3. ????Boost??????????
?????????Boost??????????????????????“BoostUnitTestSample.cpp”??“BoostUnitTest.cpp”??????stdafx.h??stdafx.cpp??targetver.h???????????????????????????????????????????????????????????
???????ù???????????
????4. ????Boost???????
????????????????????м???????????????????????ο????o???????????
??????BoostUnitTest?????е????“BoostUnitTest.cpp”????????????????′???
1 #define BOOST_TEST_MODULE Tested_Module // ????????????????????????????????????????
2
3 #include "stdafx.h"
4 #include "D:VSProjectBoostUnitTestBoostUnitTestTested ested.h" // ??????????
5
6 struct Tested_Fixture // ????о?
7 {
8 Tested_Fixture()
9 {
10 BOOST_TEST_MESSAGE("setup fixture");
11 tmpTested = new Tested();
12 }
13 ~Tested_Fixture()
14 {
15 BOOST_TEST_MESSAGE("teardown fixture");
16 delete tmpTested;
17 }
18 Tested * tmpTested;
19 };
20
21 BOOST_FIXTURE_TEST_SUITE(Tested_test?? Tested_Fixture) // ???????
22
23 BOOST_AUTO_TEST_CASE( Tested_Method_add_Test) // ????????
24 {
25 // TODO: Your test code here
26 BOOST_WARN(tmpTested->add(2?? 2) == 4); // WARN???????
27 BOOST_CHECK(tmpTested->add(2?? 2) == 4); // CHECK???????
28 BOOST_REQUIRE(tmpTested->add(2?? 2) == 4); // REQUIRE???????
29 }
30
31 BOOST_AUTO_TEST_SUITE_END()
???????“????->??????????”??????“????->????->?????????????”???????????“?????????????”?г?????“BoostUnitTest”???????????????????????
????????????????????????????360????“??????????”??????????????error LNK1104: ????????“...BoostUnitTestDebugTested.dll"???????????????????????????????????????.dll??????????????????????????????OK???
???????“???????”??????????ò???????????????????????????????
??????
???·???
??????????????????
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