forked from boostorg/system
Add tests for calling message with nullptr buffer
This commit is contained in:
@ -24,6 +24,9 @@ int main()
|
|||||||
|
|
||||||
BOOST_TEST_EQ( ec.to_string(), std::string( "system:0" ) );
|
BOOST_TEST_EQ( ec.to_string(), std::string( "system:0" ) );
|
||||||
|
|
||||||
|
// when len is 0 buffer can be nullptr
|
||||||
|
ec.message( nullptr, 0 );
|
||||||
|
|
||||||
{
|
{
|
||||||
sys::error_code ec2( ec );
|
sys::error_code ec2( ec );
|
||||||
|
|
||||||
|
@ -24,6 +24,9 @@ int main()
|
|||||||
|
|
||||||
BOOST_TEST_EQ( en.to_string(), std::string( "cond:generic:0" ) );
|
BOOST_TEST_EQ( en.to_string(), std::string( "cond:generic:0" ) );
|
||||||
|
|
||||||
|
// when len is 0 buffer can be nullptr
|
||||||
|
en.message( nullptr, 0 );
|
||||||
|
|
||||||
{
|
{
|
||||||
sys::error_condition en2( en );
|
sys::error_condition en2( en );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user