You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use boost::unit_test, it gives the similar result, and the nice colorful "No errors detected" is not printed, because everything after '\0' are not printed.
Another example using boost::unit_test
test.cpp
#defineBOOST_TEST_MODULE test.cpp
#include<boost/test/unit_test.hpp>
#include<array>
#include<vector>
#include<iostream>BOOST_AUTO_TEST_CASE(case01)
{
std::array<char, 13> array{"Hello Boost!"};
BOOST_CHECK_EQUAL(array[12], '\0');
for (auto & x: array)
std::cout << x;
std::cout << std::endl; // This '\n' is not outputed.
std::cout << "Hello C++!\n"; // This is not printed.
}
If there is a '\0' outputed, the rest information will be not outputed.
I first found it when I printed char std::array and std::vector.
test.cpp
jamroot
output:
If I use boost::unit_test, it gives the similar result, and the nice colorful "No errors detected" is not printed, because everything after '\0' are not printed.
Another example using boost::unit_test
test.cpp
jamroot
output:
The text was updated successfully, but these errors were encountered: