Skip to content

Commit

Permalink
fix clang Catch2 compile error
Browse files Browse the repository at this point in the history
```
/builds/hzdr/crp/alpaka/test/unit/mem/view/src/ViewPlainPtrTest.cpp:112:1: error: passing no argument for the '...' parameter of a variadic macro is a C++20 extension [-Werror,-Wc++20-extensions]
  112 | TEMPLATE_TEST_CASE("createView", "[memView]", (std::array<float, 4>), std::vector<float>)
```
  • Loading branch information
psychocoderHPC committed Sep 30, 2024
1 parent c30c8c1 commit 05625df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion test/unit/mem/view/src/ViewPlainPtrTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <catch2/catch_template_test_macros.hpp>

#include <numeric>
#include <tuple>
#include <type_traits>

#if BOOST_COMP_GNUC
Expand Down Expand Up @@ -109,7 +110,9 @@ TEMPLATE_LIST_TEST_CASE("viewPlainPtrOperatorTest", "[memView]", alpaka::test::T
alpaka::test::testViewPlainPtrOperators<TestType, float>();
}

TEMPLATE_TEST_CASE("createView", "[memView]", (std::array<float, 4>), std::vector<float>)
using CreateViewTestTypes = std::tuple<std::array<float, 4>, std::vector<float>>;

TEMPLATE_LIST_TEST_CASE("createView", "[memView]", CreateViewTestTypes)
{
using Dev = alpaka::DevCpu;
auto const platform = alpaka::PlatformCpu{};
Expand Down
5 changes: 4 additions & 1 deletion test/unit/vec/src/VecTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <catch2/catch_test_macros.hpp>

#include <numeric>
#include <tuple>
#include <utility>

namespace
Expand Down Expand Up @@ -469,7 +470,9 @@ TEST_CASE("accessByNameConstexpr", "[vec]")
STATIC_REQUIRE(v4.w() == 4);
}

TEMPLATE_TEST_CASE("Vec generator constructor", "[vec]", std::size_t, int, unsigned, float, double)
using VecGeneratorTestTypes = std::tuple<std::size_t, int, unsigned, float, double>;

TEMPLATE_LIST_TEST_CASE("Vec generator constructor", "[vec]", VecGeneratorTestTypes)
{
// Define a generator function
auto generator = [](auto index) { return static_cast<TestType>(index.value + 1); };
Expand Down

0 comments on commit 05625df

Please sign in to comment.