Skip to content

Commit

Permalink
Add macOS testing. (#75)
Browse files Browse the repository at this point in the history
Fixes #76
---------

Co-authored-by: Antony Polukhin <antoshkka@gmail.com>
  • Loading branch information
grafikrobot and apolukhin committed Apr 12, 2024
1 parent 02e5821 commit 92e55e8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
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

0 comments on commit 92e55e8

Please sign in to comment.