Skip to content

Commit

Permalink
Mac workflows now run the entire suite of tests, not just metaprogram…
Browse files Browse the repository at this point in the history
…ming.

This appeared to be due to inconsistent handling of ambiguous equality operators which also caused failures when migrating to C++20.

See e8b2c23

PiperOrigin-RevId: 689950458
  • Loading branch information
jwhpryor authored and copybara-github committed Oct 26, 2024
1 parent 3c55ec1 commit 5567e86
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions implementation/local_array_iteration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<kClass>{AdoptLocal{}, Fake<jobject>(1)},
LocalObject<kClass>{AdoptLocal{}, Fake<jobject>(2)},
Expand All @@ -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};
Expand Down

0 comments on commit 5567e86

Please sign in to comment.