Fixes to run SIMD test cases if HWY_TEST_STANDALONE is 1 #2376
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated HWY_TEST_MAIN in hwy/tests/hwy_gtest.h to ensure that the SIMD test cases are executed if HWY_TEST_STANDALONE is 1.
The changes made in pull request #2354 placed the main function that was defined by the HWY_AFTER_TEST() macro in an anonymous namespace (instead of the global namespace) if HWY_TEST_STANDALONE is 1, which prevented SIMD test cases from being executed.
The changes in this pull request remove the unnecessary declaration of the main function by the HWY_AFTER_TEST() macro if HWY_TEST_STANDALONE is 1, and added code to run the SIMD tests in HWY_TEST_MAIN() if HWY_TEST_STANDALONE is 1.
The SIMD unit tests will now run if HWY_TEST_STANDALONE is 1 with the changes in this pull request.