Skip to content

Commit 36c1225

Browse files
committed
Get rid of extra-confounding test helper code
I can't work out why all this complexity could be needed. My guess is there was a plan to mould this further into something useful, but we're not using it and it's fairly confusing to boot. DELETE.
1 parent d18d523 commit 36c1225

File tree

2 files changed

+4
-52
lines changed

2 files changed

+4
-52
lines changed

test/adapters/cuda/fixtures.h

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,12 @@
88
#include <cuda.h>
99
#include <uur/fixtures.h>
1010

11-
namespace uur {
12-
struct ResultCuda {
13-
14-
constexpr ResultCuda(CUresult result) noexcept : value(result) {}
15-
16-
inline bool operator==(const ResultCuda &rhs) const noexcept {
17-
return rhs.value == value;
18-
}
19-
20-
CUresult value;
21-
};
22-
23-
} // namespace uur
24-
25-
#ifndef ASSERT_EQ_RESULT_CUDA
26-
#define ASSERT_EQ_RESULT_CUDA(EXPECTED, ACTUAL) \
27-
ASSERT_EQ(uur::ResultCuda(EXPECTED), uur::ResultCuda(ACTUAL))
28-
#endif // ASSERT_EQ_RESULT_CUDA
29-
3011
#ifndef ASSERT_SUCCESS_CUDA
31-
#define ASSERT_SUCCESS_CUDA(ACTUAL) ASSERT_EQ_RESULT_CUDA(CUDA_SUCCESS, ACTUAL)
12+
#define ASSERT_SUCCESS_CUDA(ACTUAL) ASSERT_EQ(CUDA_SUCCESS, (ACTUAL))
3213
#endif // ASSERT_SUCCESS_CUDA
3314

34-
#ifndef EXPECT_EQ_RESULT_CUDA
35-
#define EXPECT_EQ_RESULT_CUDA(EXPECTED, ACTUAL) \
36-
EXPECT_EQ(uur::ResultCuda(EXPECTED), uur::ResultCuda(ACTUAL))
37-
#endif // EXPECT_EQ_RESULT_CUDA
38-
3915
#ifndef EXPECT_SUCCESS_CUDA
40-
#define EXPECT_SUCCESS_CUDA(ACTUAL) EXPECT_EQ_RESULT_CUDA(CUDA_SUCCESS, ACTUAL)
16+
#define EXPECT_SUCCESS_CUDA(ACTUAL) EXPECT_EQ(CUDA_SUCCESS, (ACTUAL))
4117
#endif // EXPECT_EQ_RESULT_CUDA
4218

4319
#endif // UR_TEST_CONFORMANCE_ADAPTERS_CUDA_FIXTURES_H_INCLUDED

test/adapters/hip/fixtures.h

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,12 @@
88
#include <hip/hip_runtime.h>
99
#include <uur/fixtures.h>
1010

11-
namespace uur {
12-
13-
struct ResultHip {
14-
constexpr ResultHip(hipError_t result) noexcept : value(result) {}
15-
16-
inline bool operator==(const ResultHip &rhs) const noexcept {
17-
return rhs.value == value;
18-
}
19-
20-
hipError_t value;
21-
};
22-
23-
} // namespace uur
24-
25-
#ifndef ASSERT_EQ_RESULT_HIP
26-
#define ASSERT_EQ_RESULT_HIP(EXPECTED, ACTUAL) \
27-
ASSERT_EQ(uur::ResultHip(EXPECTED), uur::ResultHip(ACTUAL))
28-
#endif // ASSERT_EQ_RESULT_HIP
29-
3011
#ifndef ASSERT_SUCCESS_HIP
31-
#define ASSERT_SUCCESS_HIP(ACTUAL) ASSERT_EQ_RESULT_HIP(hipSuccess, ACTUAL)
12+
#define ASSERT_SUCCESS_HIP(ACTUAL) ASSERT_EQ(hipSuccess, (ACTUAL))
3213
#endif // ASSERT_SUCCESS_HIP
3314

34-
#ifndef EXPECT_EQ_RESULT_HIP
35-
#define EXPECT_EQ_RESULT_HIP(EXPECTED, ACTUAL) \
36-
EXPECT_EQ_RESULT_HIP(uur::ResultHip(EXPECTED), uur::ResultHip(ACTUAL))
37-
#endif // EXPECT_EQ_RESULT_HIP
38-
3915
#ifndef EXPECT_SUCCESS_HIP
40-
#define EXPECT_SUCCESS_HIP(ACTUAL) EXPECT_EQ_RESULT_HIP(hipSuccess, ACTUAL)
16+
#define EXPECT_SUCCESS_HIP(ACTUAL) EXPECT_EQ(hipSuccess, (ACTUAL))
4117
#endif // EXPECT_EQ_RESULT_HIP
4218

4319
#endif // UR_TEST_CONFORMANCE_ADAPTERS_HIP_FIXTURES_H_INCLUDED

0 commit comments

Comments
 (0)