Skip to content

Commit

Permalink
Try reverting base_fixture change
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Sep 7, 2023
1 parent 4716f13 commit 2201bc1
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions cpp/include/cudf_test/base_fixture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,17 @@ namespace test {
* class MyTestFixture : public cudf::test::BaseFixture {};
* ```
*/
class BaseFixture : public ::testing::Test {};
class BaseFixture : public ::testing::Test {
rmm::mr::device_memory_resource* _mr{rmm::mr::get_current_device_resource()};

public:
/**
* @brief Returns pointer to `device_memory_resource` that should be used for
* all tests inheriting from this fixture
* @return pointer to memory resource
*/
rmm::mr::device_memory_resource* mr() { return _mr; }
};

/**
* @brief Base test fixture that takes a parameter.
Expand All @@ -58,7 +68,17 @@ class BaseFixture : public ::testing::Test {};
* ```
*/
template <typename T>
class BaseFixtureWithParam : public ::testing::TestWithParam<T> {};
class BaseFixtureWithParam : public ::testing::TestWithParam<T> {
rmm::mr::device_memory_resource* _mr{rmm::mr::get_current_device_resource()};

public:
/**
* @brief Returns pointer to `device_memory_resource` that should be used for
* all tests inheriting from this fixture
* @return pointer to memory resource
*/
rmm::mr::device_memory_resource* mr() const { return _mr; }
};

template <typename T, typename Enable = void>
struct uniform_distribution_impl {};
Expand Down

0 comments on commit 2201bc1

Please sign in to comment.