Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Gtest version following Rapids-cmake change #1126

Merged
merged 3 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ dependencies:
- doxygen
- gcc_linux-64=11.*
- geopandas>=0.11.0
- gmock=1.10.0
- gtest=1.10.0
- gmock>=1.13.0
- gtest>=1.13.0
- ipython
- ipywidgets
- libcudf==23.6.*
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/libcuspatial/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cmake_version:
- ">=3.23.1,!=3.25.0"

gtest_version:
- "1.10.0"
- ">=1.13.0"

sysroot_version:
- "2.17"
5 changes: 3 additions & 2 deletions cpp/include/cuspatial_test/test_util.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
#include <cuspatial/geometry/vec_2d.hpp>
#include <cuspatial/traits.hpp>

#include <iomanip>
#include <rmm/device_uvector.hpp>

#include <string_view>
#include <thrust/for_each.h>
#include <thrust/host_vector.h>
#include <thrust/optional.h>

#include <cstdio>
#include <iomanip>
#include <string_view>

namespace cuspatial {

Expand Down
16 changes: 16 additions & 0 deletions cpp/tests/operators/linestrings_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include <gtest/gtest.h>

#include <iostream>
#include <optional>

using namespace cuspatial;
Expand All @@ -39,6 +40,21 @@ using namespace cuspatial::test;
template <typename T>
using optional_vec2d = thrust::optional<vec_2d<T>>;

namespace cuspatial {

// Required by gtest test suite to compile
// Need to be defined within cuspatial namespace for ADL.
template <typename T>
std::ostream& operator<<(std::ostream& os, thrust::optional<vec_2d<T>> const& opt)
{
if (opt.has_value())
return os << opt.value();
else
return os << "null";
}

} // namespace cuspatial

template <typename T>
struct SegmentIntersectionTest : public BaseFixture {};

Expand Down
20 changes: 20 additions & 0 deletions cpp/tests/trajectory/derive_trajectories_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@
#include <gtest/gtest.h>

#include <cstdint>
#include <iostream>

namespace std {

// Required by gtest EXPECT_EQ test suite to compile.
// Since `time_point` is an alias on
// std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>,
// according to ADL rules for templates, only the inner most enclosing namespaces,
// and associated namespaces of the template arguments are added to search. In this
// case, only `std` namespace is searched.
//
// [1]: https://en.cppreference.com/w/cpp/language/adl
std::ostream& operator<<(std::ostream& os, cuspatial::test::time_point const& tp)
{
// Output the time point in the desired format
os << tp.time_since_epoch().count() << "ms";
return os;
}

} // namespace std

template <typename T>
struct DeriveTrajectoriesTest : public ::testing::Test {};
Expand Down
4 changes: 2 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ dependencies:
- &cmake_ver cmake>=3.23.1,!=3.25.0
- c-compiler
- cxx-compiler
- gmock=1.10.0
- gtest=1.10.0
- gmock>=1.13.0
- gtest>=1.13.0
- libcudf==23.6.*
- librmm==23.6.*
- ninja
Expand Down