From e2672f690b9cfc412c239ef9fc1a179b19cac1ca Mon Sep 17 00:00:00 2001 From: Gautam Dhar Date: Wed, 25 Sep 2024 05:16:57 +0530 Subject: [PATCH] 8. testing floating-point changes for macos pre and post arm64 --- .github/workflows/linux.yml.disabled | 2 +- .github/workflows/macos.yml | 6 +++--- .github/workflows/windows.yml.disabled | 2 +- tests/testFloatingPointPrecision.cpp | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux.yml.disabled b/.github/workflows/linux.yml.disabled index d7b4ec1..4027403 100644 --- a/.github/workflows/linux.yml.disabled +++ b/.github/workflows/linux.yml.disabled @@ -104,5 +104,5 @@ jobs: run: ctest -C Release --verbose - name: Install [Release] run: sudo cmake --install "${{github.workspace}}/build-release" --config Release - - name: Check Work-Arounds + - name: Check Work-Around-Flags run: grep define "${{github.workspace}}/build-release/include/converter/_workaroundConfig.h" | grep -v -e "^//" -e " e_[^ ]*_FEATURE " diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3c1907f..1e4dc92 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -74,7 +74,7 @@ jobs: #run: ctest -C Debug --output-on-failure -j run: ctest -C Debug --verbose - name: Install [Debug] - run: cmake --install "${{github.workspace}}/build-debug" --config Debug + run: sudo cmake --install "${{github.workspace}}/build-debug" --config Debug - name: Configure CMake (compiler=default) [Release] if: matrix.compiler == 'default' run: cmake -S "${{github.workspace}}" -B "${{github.workspace}}/build-release" -DCONVERTER_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON @@ -87,6 +87,6 @@ jobs: working-directory: ${{github.workspace}}/build-release run: ctest -C Release --verbose - name: Install [Release] - run: cmake --install "${{github.workspace}}/build-release" --config Release - - name: Check Work-Arounds + run: sudo cmake --install "${{github.workspace}}/build-release" --config Release + - name: Check Work-Around-Flags run: grep define "${{github.workspace}}/build-release/include/converter/_workaroundConfig.h" | grep -v -e "^//" -e " e_[^ ]*_FEATURE " diff --git a/.github/workflows/windows.yml.disabled b/.github/workflows/windows.yml.disabled index 96cc321..29ece36 100644 --- a/.github/workflows/windows.yml.disabled +++ b/.github/workflows/windows.yml.disabled @@ -106,7 +106,7 @@ jobs: run: ctest -C Release --verbose - name: Install [Release] run: cmake --install "${{github.workspace}}/build-release" --config Release - - name: Check Work-Arounds + - name: Check Work-Around-Flags run: grep define "${{github.workspace}}/build-release/include/converter/_workaroundConfig.h" | grep -v -e "^//" -e " e_[^ ]*_FEATURE " diff --git a/tests/testFloatingPointPrecision.cpp b/tests/testFloatingPointPrecision.cpp index 74cef3f..3ad4390 100644 --- a/tests/testFloatingPointPrecision.cpp +++ b/tests/testFloatingPointPrecision.cpp @@ -140,10 +140,10 @@ int main() "3.3123412e+38", 3.3123412E38f, "3.3123412e+38"); std::string expected_float_3d3123412en38[] = { "3.312341e-38", -#if MACH_MACOS_ARRAY_IDX == MACH_POST_MACOS14_ARM_CLANG +#if MACH_MACOS_ARRAY_IDX == MACH_POST_MACOS14_ARM_CLANG \ + || MACH_MACOS_ARRAY_IDX == MACH_PRE_MACOS14_CLANG "3.31234111e-38", // macOS //#elif MACH_MACOS_ARRAY_IDX == MACH_POST_MACOS14_ARM_GNU -//#elif MACH_MACOS_ARRAY_IDX == MACH_PRE_MACOS14_CLANG #else // default MACH_MACOS_ARRAY_IDX == MACH_PRE_MACOS14_GNU "3.312341e-38", #endif @@ -152,9 +152,9 @@ int main() "3.3123412e-38", 3.3123412E-38f, expected_float_3d3123412en38[indexOS]); std::string expected_double_4d3123412en38[] = { "4.3123412e-38", -#if MACH_MACOS_ARRAY_IDX == MACH_PRE_MACOS14_CLANG +#if MACH_MACOS_ARRAY_IDX == MACH_POST_MACOS14_ARM_CLANG "4.31234119999999987e-38", // macOS -//#elif MACH_MACOS_ARRAY_IDX == MACH_POST_MACOS14_ARM_CLANG +//#elif MACH_MACOS_ARRAY_IDX == MACH_PRE_MACOS14_CLANG //#elif MACH_MACOS_ARRAY_IDX == MACH_POST_MACOS14_ARM_GNU #else // default MACH_MACOS_ARRAY_IDX == MACH_PRE_MACOS14_GNU "4.3123412e-38",