diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index a428c0b6d..5fda0d096 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -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.* diff --git a/conda/recipes/libcuspatial/conda_build_config.yaml b/conda/recipes/libcuspatial/conda_build_config.yaml index a50e5c3ff..6056ed6b2 100644 --- a/conda/recipes/libcuspatial/conda_build_config.yaml +++ b/conda/recipes/libcuspatial/conda_build_config.yaml @@ -11,7 +11,7 @@ cmake_version: - ">=3.23.1,!=3.25.0" gtest_version: - - "1.10.0" + - ">=1.13.0" sysroot_version: - "2.17" diff --git a/cpp/include/cuspatial_test/test_util.cuh b/cpp/include/cuspatial_test/test_util.cuh index 2cc10bae9..bf9e1fb01 100644 --- a/cpp/include/cuspatial_test/test_util.cuh +++ b/cpp/include/cuspatial_test/test_util.cuh @@ -19,14 +19,15 @@ #include #include -#include #include -#include #include #include +#include #include +#include +#include namespace cuspatial { diff --git a/cpp/tests/operators/linestrings_test.cu b/cpp/tests/operators/linestrings_test.cu index 86c8133c4..e67810f33 100644 --- a/cpp/tests/operators/linestrings_test.cu +++ b/cpp/tests/operators/linestrings_test.cu @@ -30,6 +30,7 @@ #include +#include #include using namespace cuspatial; @@ -39,6 +40,21 @@ using namespace cuspatial::test; template using optional_vec2d = thrust::optional>; +namespace cuspatial { + +// Required by gtest test suite to compile +// Need to be defined within cuspatial namespace for ADL. +template +std::ostream& operator<<(std::ostream& os, thrust::optional> const& opt) +{ + if (opt.has_value()) + return os << opt.value(); + else + return os << "null"; +} + +} // namespace cuspatial + template struct SegmentIntersectionTest : public BaseFixture {}; diff --git a/cpp/tests/trajectory/derive_trajectories_test.cu b/cpp/tests/trajectory/derive_trajectories_test.cu index cc47700c7..d6b78b6ec 100644 --- a/cpp/tests/trajectory/derive_trajectories_test.cu +++ b/cpp/tests/trajectory/derive_trajectories_test.cu @@ -35,6 +35,26 @@ #include #include +#include + +namespace std { + +// Required by gtest EXPECT_EQ test suite to compile. +// Since `time_point` is an alias on +// std::chrono::time_point, +// 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 struct DeriveTrajectoriesTest : public ::testing::Test {}; diff --git a/dependencies.yaml b/dependencies.yaml index f078c3716..86694ef13 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -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