Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macOS testing. #75

Merged
merged 5 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
compiler: clang++-14
cxxstd: "03,11,14,17,2a"
os: ubuntu-22.04
- toolset: clang
cxxstd: "11,14,17,20"
os: macos-13

runs-on: ${{matrix.os}}

Expand Down
3 changes: 2 additions & 1 deletion test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ test-suite conversion

# Make sure that LexicalCast works the same way as some of the C++ Standard Libraries
[ run float_types_test.cpp : : : <define>BOOST_LEXICAL_CAST_DETAIL_TEST_ON_OLD
<toolset>msvc:<build>no # could have outdated behavior in some border cases
<toolset>msvc:<build>no # could have outdated behavior in some border cases
<target-os>darwin:<build>no # may have outdated behavior in some border cases
: float_types_non_opt
]

Expand Down
3 changes: 2 additions & 1 deletion test/integral_types_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
#define BOOST_LCAST_NO_WCHAR_T
#endif

#if defined(BOOST_HAS_INT128) && !defined(BOOST_LEXICAL_CAST_TEST_NO_128_INTS)
// There's no typeinfo for unsigned __int128 in Xcode_15.0.1
#if defined(BOOST_HAS_INT128) && !defined(BOOST_LEXICAL_CAST_TEST_NO_128_INTS) && !defined(__APPLE__)
# define BOOST_LCAST_TEST_128 1
#endif

Expand Down
14 changes: 6 additions & 8 deletions test/lexical_cast_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,21 +523,23 @@ void operators_overload_test()
}


#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
void test_char16_conversions()
{
// There's no std::ctype<char16_t> in Xcode_15.0.1
#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(__APPLE__)
BOOST_TEST(u"100" == lexical_cast<std::u16string>(u"100"));
BOOST_TEST(u"1" == lexical_cast<std::u16string>(u'1'));
}
#endif
}

#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
void test_char32_conversions()
{
// There's no std::ctype<char32_t> in Xcode_15.0.1
#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(__APPLE__)
BOOST_TEST(U"100" == lexical_cast<std::u32string>(U"100"));
BOOST_TEST(U"1" == lexical_cast<std::u32string>(U'1'));
}
#endif
}

void test_getting_pointer_to_function()
{
Expand Down Expand Up @@ -585,12 +587,8 @@ int main()

test_char_types_conversions();
operators_overload_test();
#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
test_char16_conversions();
#endif
#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
test_char32_conversions();
#endif
test_getting_pointer_to_function();

return boost::report_errors();
Expand Down
Loading