Compare commits

..

2 Commits

Author SHA1 Message Date
152b36e86f Update throw_exception_test4.cpp. Refs boostorg/assert#34. 2023-11-29 02:49:09 +02:00
78947332e1 Update ci.yml 2023-11-29 02:21:36 +02:00
2 changed files with 35 additions and 9 deletions

View File

@ -115,17 +115,20 @@ jobs:
- toolset: clang
compiler: clang++-13
cxxstd: "03,11,14,17,20,2b"
os: ubuntu-22.04
container: ubuntu:22.04
os: ubuntu-latest
install: clang-13
- toolset: clang
compiler: clang++-14
cxxstd: "03,11,14,17,20,2b"
os: ubuntu-22.04
container: ubuntu:22.04
os: ubuntu-latest
install: clang-14
- toolset: clang
compiler: clang++-15
cxxstd: "03,11,14,17,20,2b"
os: ubuntu-22.04
container: ubuntu:22.04
os: ubuntu-latest
install: clang-15
- toolset: clang
compiler: clang++-16
@ -133,6 +136,12 @@ jobs:
os: ubuntu-latest
container: ubuntu:23.04
install: clang-16
- toolset: clang
compiler: clang++-17
cxxstd: "03,11,14,17,20,2b"
os: ubuntu-latest
container: ubuntu:23.10
install: clang-17
- toolset: clang
cxxstd: "03,11,14,17,2a"
os: macos-11
@ -265,6 +274,7 @@ jobs:
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
- os: macos-13
runs-on: ${{matrix.os}}
@ -312,6 +322,7 @@ jobs:
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
- os: macos-13
runs-on: ${{matrix.os}}
@ -369,6 +380,7 @@ jobs:
- os: ubuntu-22.04
- os: macos-11
- os: macos-12
- os: macos-13
runs-on: ${{matrix.os}}

View File

@ -28,6 +28,20 @@ char const* translate_function( char const * fn, char const * cfn )
return fn[0] == 0 || std::strcmp( fn, "main" ) == 0? cfn: fn;
}
static char const* adjust_filename( char const* file )
{
#if defined(__INTEL_LLVM_COMPILER) && __INTEL_LLVM_COMPILER >= 20210300
char const* fn = std::strrchr( file, '/' );
return fn? fn + 1: file;
#else
return file;
#endif
}
int main()
{
try
@ -40,14 +54,14 @@ int main()
char const * const * file = boost::get_error_info<boost::throw_file>( x );
BOOST_TEST( file != 0 );
BOOST_TEST_CSTR_EQ( *file, __FILE__ );
BOOST_TEST_CSTR_EQ( *file, adjust_filename(__FILE__) );
}
{
int const * line = boost::get_error_info<boost::throw_line>( x );
BOOST_TEST( line != 0 );
BOOST_TEST_EQ( *line, 35 );
BOOST_TEST_EQ( *line, 49 );
}
{
@ -68,14 +82,14 @@ int main()
char const * const * file = boost::get_error_info<boost::throw_file>( x );
BOOST_TEST( file != 0 );
BOOST_TEST_CSTR_EQ( *file, __FILE__ );
BOOST_TEST_CSTR_EQ( *file, adjust_filename(__FILE__) );
}
{
int const * line = boost::get_error_info<boost::throw_line>( x );
BOOST_TEST( line != 0 );
BOOST_TEST_EQ( *line, 63 );
BOOST_TEST_EQ( *line, 77 );
}
{
@ -96,14 +110,14 @@ int main()
char const * const * file = boost::get_error_info<boost::throw_file>( x );
BOOST_TEST( file != 0 );
BOOST_TEST_CSTR_EQ( *file, __FILE__ );
BOOST_TEST_CSTR_EQ( *file, adjust_filename(__FILE__) );
}
{
int const * line = boost::get_error_info<boost::throw_line>( x );
BOOST_TEST( line != 0 );
BOOST_TEST_EQ( *line, 91 );
BOOST_TEST_EQ( *line, 105 );
}
{