About problem
When I include main function to program where I use BOOST TEST I see this:
error: conflicting declaration of C function ‘int main()’ 10 | int main(void)
I don't know it should work becouse I started learn Boost test a few days ago. If it should work (main with tests) please tell me why it don't work. If it shouldn't work tell me how to connect tests with main functions.
Thanks for your help :)
Code
#define BOOST_TEST_MODULE test
#include <boost/test/included/unit_test.hpp>
template<typename numOne, typename numTwo>
decltype(auto) addNums(numOne&& num1, numTwo&& num2) noexcept
{
return num1 + num2;
}
int main(void)
{
std::cout << addNums(3,4);
}
BOOST_AUTO_TEST_CASE(testOne)
{
BOOST_CHECK(addNums(3, 3) == 6);
}