forked from boostorg/throw_exception
Compare commits
2 Commits
boost-1.83
...
feature/as
Author | SHA1 | Date | |
---|---|---|---|
152b36e86f | |||
78947332e1 |
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
@ -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}}
|
||||
|
||||
|
@ -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 );
|
||||
}
|
||||
|
||||
{
|
||||
|
Reference in New Issue
Block a user