From 5567e86e3d02d47b83e1e5fcf2e68dcc7c237c43 Mon Sep 17 00:00:00 2001 From: Jamieson Pryor Date: Fri, 25 Oct 2024 16:35:42 -0700 Subject: [PATCH] Mac workflows now run the entire suite of tests, not just metaprogramming. This appeared to be due to inconsistent handling of ambiguous equality operators which also caused failures when migrating to C++20. See https://github.com/google/jni-bind/commit/e8b2c23d2406be8d47f17040534ac70b5e64491e PiperOrigin-RevId: 689950458 --- .github/workflows/ci.yml | 5 +---- implementation/local_array_iteration_test.cc | 6 ------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f48c6c3..d2c0b75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,15 +24,12 @@ jobs: - name: test run: bazel test --cxxopt='-Werror' --cxxopt='-std=c++20' --repo_env=CC=clang --test_output=errors ... - - # NOTE: Mac is only running a small subset of targets due to an unresolved - # issue in Bazel. When this is fixed in the future I will expand testing. macos-latest-cpp17: runs-on: macos-latest steps: - uses: actions/checkout@v4 - name: test - run: bazel query --output=label 'kind("...", //...) except attr(tags, "cpp20", //metaprogramming/...)' | xargs bazel test --cxxopt='-Werror' --cxxopt='-std=c++17' --repo_env=CC=clang --test_output=errors + run: bazel query --output=label 'kind("...", //...) except attr(tags, "cpp20", //...)' | xargs bazel test --cxxopt='-Werror' --cxxopt='-std=c++17' --repo_env=CC=clang --test_output=errors macos-latest-cpp20: runs-on: macos-latest diff --git a/implementation/local_array_iteration_test.cc b/implementation/local_array_iteration_test.cc index 6b631f3..8750e86 100644 --- a/implementation/local_array_iteration_test.cc +++ b/implementation/local_array_iteration_test.cc @@ -87,10 +87,6 @@ TEST_F(JniTest, WorksWithSTLComparisonOfObjects) { std::equal(array_view.begin(), array_view.end(), expected.begin())); } -// It's unclear to me if this is an STL bug or not, however, std::equal -// apparently finds a comparison ambiguous here. -#ifndef __APPLE__ - TEST_F(JniTest, WorksWithSTLComparisonOfRichlyDecoratedObjects) { std::array expected{LocalObject{AdoptLocal{}, Fake(1)}, LocalObject{AdoptLocal{}, Fake(2)}, @@ -108,8 +104,6 @@ TEST_F(JniTest, WorksWithSTLComparisonOfRichlyDecoratedObjects) { std::equal(array_view.begin(), array_view.end(), expected.begin())); } -#endif - TEST_F(JniTest, 2D_Iterates) { int a[5] = {1, 2, 3, 4, 5}; std::array expected{1, 2, 3, 4, 5};