Skip to content

Commit

Permalink
fix gtest
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Sep 24, 2024
1 parent e820545 commit cb1a84a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
7 changes: 7 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ endif()

if(KvikIO_BUILD_TESTS AND CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(cmake/thirdparty/get_gtest.cmake)

# include CTest module -- automatically calls enable_testing()
include(CTest)

# Always print verbose output when tests fail if run using `make test`.
list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure")
add_subdirectory(tests)
endif()

include(CPack)
Expand Down
15 changes: 0 additions & 15 deletions cpp/tests/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ class TempDir {
std::filesystem::path _dir_path{};
};

<<<<<<< HEAD
class DevBuffer {
public:
=======
/**
* @brief Help class for creating and comparing buffers.
*/
Expand All @@ -118,7 +114,6 @@ class DevBuffer {
const std::size_t nbytes;
void* ptr{nullptr};

>>>>>>> 5c18c1bacac4d84630526ebecc1033410f6da4c9
DevBuffer(std::size_t nelem) : nelem{nelem}, nbytes{nelem * sizeof(std::int64_t)}
{
KVIKIO_CHECK_CUDA(cudaMalloc(&ptr, nbytes));
Expand Down Expand Up @@ -159,22 +154,12 @@ class DevBuffer {
}
std::cout << ")" << std::endl;
}
<<<<<<< HEAD

const std::size_t nelem;
const std::size_t nbytes;
void* ptr{nullptr};
};

void expect_equal(const DevBuffer& a, const DevBuffer& b)
=======
};

/**
* @brief Check that two buffers are equal
*/
inline void expect_equal(const DevBuffer& a, const DevBuffer& b)
>>>>>>> 5c18c1bacac4d84630526ebecc1033410f6da4c9
{
EXPECT_EQ(a.nbytes, b.nbytes);
auto a_vec = a.to_vector();
Expand Down

0 comments on commit cb1a84a

Please sign in to comment.