?????????“????”?ù????????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???

???????“???????”??????????ò???????????????????????????????