Skip to content

Commit

Permalink
8. testing floating-point changes for macos pre and post arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
panchaBhuta committed Sep 24, 2024
1 parent 2a2ea26 commit e2672f6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
6 changes: 3 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 "
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -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 "


8 changes: 4 additions & 4 deletions tests/testFloatingPointPrecision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand Down

0 comments on commit e2672f6

Please sign in to comment.