Skip to content

Commit

Permalink
ci: skip more unit tests in Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
canepat committed Mar 3, 2025
1 parent 5695aed commit f04ade6
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ std::vector<TRange> ranges(TRange r1, TRange r2) {
return results;
}

// Skip to avoid Windows error C3889: call to object of class type 'std::ranges::_Begin::_Cpo': no matching call operator found
// Unable to reproduce: https://godbolt.org/z/3jd5brKMj
#ifndef _WIN32
TEST_CASE("MergeUniqueManyView") {
CHECK(vector_from_range(merge_unique_many(ranges(
silkworm::ranges::owning_view(std::vector<int>{1, 2, 3}),
Expand Down Expand Up @@ -71,15 +74,13 @@ TEST_CASE("MergeUniqueManyView") {
CHECK(vector_from_range(merge_unique_many(ranges(silkworm::ranges::owning_view(std::vector<int>{1, 2, 3}), silkworm::ranges::owning_view(std::vector<int>{})))) == std::vector<int>{1, 2, 3});
CHECK(vector_from_range(merge_unique_many(ranges(silkworm::ranges::owning_view(std::vector<int>{}), silkworm::ranges::owning_view(std::vector<int>{2, 3, 4})))) == std::vector<int>{2, 3, 4});

// Skip to avoid Windows error C3889: call to object of class type 'std::ranges::_Begin::_Cpo': no matching call operator found
// Unable to reproduce: https://godbolt.org/z/3jd5brKMj
#ifndef _WIN32
using IntToVectorFunc = std::function<std::vector<int>(int)>;
CHECK(vector_from_range(merge_unique_many(ranges(
silkworm::ranges::owning_view(std::vector<int>{1, 2, 3}) | std::views::transform(IntToVectorFunc{[](int v) { return std::vector<int>{v, v, v}; }}) | std::views::join,
silkworm::ranges::owning_view(std::vector<int>{4, 4, 4}) | std::views::transform(IntToVectorFunc{[](int v) { return std::vector<int>{v}; }}) | std::views::join))) ==
std::vector<int>{1, 2, 3, 4});
#endif // _WIN32

}
#endif // _WIN32

} // namespace silkworm::views

0 comments on commit f04ade6

Please # to comment.