mirror of
https://github.com/boostorg/core.git
synced 2025-11-28 21:30:09 +01:00
compare pointers as addresses and use BOOST_TEST_CSTR_xx to compare cstrings
This commit is contained in:
@@ -64,14 +64,15 @@ int main()
|
||||
|
||||
BOOST_TEST_EQ( ++x, ++y );
|
||||
BOOST_TEST_EQ( x++, y++ );
|
||||
|
||||
BOOST_TEST_EQ("xabc"+1, "yabc"+1); // make sure addresses are different
|
||||
BOOST_TEST_CSTR_EQ("xabc"+1, "yabc"+1); // equal cstrings, different addresses
|
||||
BOOST_TEST_EQ( &y, &y );
|
||||
|
||||
// BOOST_TEST_NE
|
||||
|
||||
BOOST_TEST_NE( ++x, y );
|
||||
BOOST_TEST_NE( &x, &y );
|
||||
BOOST_TEST_NE( "abc", "ABC" );
|
||||
BOOST_TEST_NE("xabc"+1, "yabc"+1); // equal cstrings, different addresses
|
||||
BOOST_TEST_CSTR_NE("x", "y");
|
||||
|
||||
// BOOST_TEST_THROWS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user