Skip to content

Commit

Permalink
Merge pull request #970 from xtensor-stack/feature/test-apple-m1
Browse files Browse the repository at this point in the history
Run tests on Apple M1
  • Loading branch information
JohanMabille committed Jan 31, 2024
2 parents 38f15d3 + 9754aa9 commit b6868c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ jobs:
strategy:
matrix:
os:
- 11
- 12
- 13
- 14
runs-on: macos-${{ matrix.os }}
name: 'macos-${{ matrix.os }}'
steps:
Expand Down
6 changes: 3 additions & 3 deletions test/test_xsimd_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,11 @@ struct xsimd_api_float_types_functions
{
value_type val0(3);
value_type val1(4);
#ifndef EMSCRIPTEN
CHECK_EQ(extract(xsimd::polar(T(val0), T(val1))), std::polar(val0, val1));
#else
#if defined(EMSCRIPTEN) || (defined(__APPLE__) && defined(XSIMD_WITH_NEON64))
CHECK_EQ(std::real(extract(xsimd::polar(T(val0), T(val1)))), doctest::Approx(std::real(std::polar(val0, val1))));
CHECK_EQ(std::imag(extract(xsimd::polar(T(val0), T(val1)))), doctest::Approx(std::imag(std::polar(val0, val1))));
#else
CHECK_EQ(extract(xsimd::polar(T(val0), T(val1))), std::polar(val0, val1));
#endif
}
void test_pow()
Expand Down

0 comments on commit b6868c2

Please sign in to comment.