mirror of
https://github.com/boostorg/assert.git
synced 2025-09-27 16:20:58 +02:00
Update source_location_test4.cpp
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
boost::source_location s_loc = BOOST_CURRENT_LOCATION;
|
||||
|
||||
BOOST_STATIC_CONSTEXPR boost::source_location c_loc = BOOST_CURRENT_LOCATION;
|
||||
|
||||
boost::source_location f( boost::source_location const& loc = BOOST_CURRENT_LOCATION )
|
||||
{
|
||||
return loc;
|
||||
@@ -26,11 +28,16 @@ int main()
|
||||
#endif
|
||||
}
|
||||
|
||||
{
|
||||
BOOST_TEST_CSTR_EQ( c_loc.file_name(), __FILE__ );
|
||||
BOOST_TEST_EQ( c_loc.line(), 11 );
|
||||
}
|
||||
|
||||
{
|
||||
boost::source_location loc = f();
|
||||
|
||||
BOOST_TEST_CSTR_EQ( loc.file_name(), __FILE__ );
|
||||
BOOST_TEST( loc.line() == 11 || loc.line() == 30 );
|
||||
BOOST_TEST( loc.line() == 13 || loc.line() == 37 );
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
|
Reference in New Issue
Block a user