Visual Studio Test Explorer not detecting Boost Te

2019-08-25 04:02发布

I'm trying to get into testing in c++ using VS2015 with Boost, following this guide on docs.microsoft.

I've installed the boost unit test adapter from the marketplace.

If my understanding is correct, I should now be able to see my boost test cases in the test case explorer within VS2015 but somehow I don't see any of them. Building the project runs just fine and depending on whether my test cases are valid or not, the program exits with 0 or 201.

My project has a single .cpp file with the following contents:

#define BOOST_TEST_MODULE MyTest
#include <boost/test/included/unit_test.hpp>

BOOST_AUTO_TEST_CASE(my_boost_test)
{   
    BOOST_CHECK(0==0);
}    

BOOST_AUTO_TEST_CASE(my_boost_test2)
{
    BOOST_CHECK(0==1);
}

0条回答
登录 后发表回答