From 9754aa988a83fee50d19a590fe98499463ed3699 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 9 Nov 2023 22:29:57 +0100 Subject: [PATCH] Run tests on Apple M1 --- .github/workflows/macos.yml | 3 ++- test/test_xsimd_api.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2694960f1..07a934d35 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -8,8 +8,9 @@ jobs: strategy: matrix: os: - - 11 - 12 + - 13 + - 14 runs-on: macos-${{ matrix.os }} name: 'macos-${{ matrix.os }}' steps: diff --git a/test/test_xsimd_api.cpp b/test/test_xsimd_api.cpp index 283f4232e..440ef015c 100644 --- a/test/test_xsimd_api.cpp +++ b/test/test_xsimd_api.cpp @@ -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()