From 690019d85d418c0da9240a738b379ee4034e3fab Mon Sep 17 00:00:00 2001 From: AuroraPerego Date: Tue, 16 Jul 2024 12:12:47 +0200 Subject: [PATCH] add tests for isQueue and isDevice --- test/unit/dev/src/DevWarpSizeTest.cpp | 7 +++++++ test/unit/queue/src/QueueTest.cpp | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/test/unit/dev/src/DevWarpSizeTest.cpp b/test/unit/dev/src/DevWarpSizeTest.cpp index e8f76b37d346..b451ccb1a71a 100644 --- a/test/unit/dev/src/DevWarpSizeTest.cpp +++ b/test/unit/dev/src/DevWarpSizeTest.cpp @@ -29,3 +29,10 @@ TEMPLATE_LIST_TEST_CASE("getPreferredWarpSize", "[dev]", alpaka::test::TestAccs) auto const preferredWarpSize = alpaka::getPreferredWarpSize(dev); REQUIRE(preferredWarpSize > 0); } + +TEMPLATE_LIST_TEST_CASE("isDevice", "[dev]", alpaka::test::TestAccs) +{ + auto const platform = alpaka::Platform{}; + auto const dev = alpaka::getDevByIdx(platform, 0); + REQUIRE(alpaka::isDevice); +} diff --git a/test/unit/queue/src/QueueTest.cpp b/test/unit/queue/src/QueueTest.cpp index 60344ed6b260..32553a4ebcd2 100644 --- a/test/unit/queue/src/QueueTest.cpp +++ b/test/unit/queue/src/QueueTest.cpp @@ -269,3 +269,12 @@ TEMPLATE_LIST_TEST_CASE("enqueueBenchmark", "[queue]", alpaka::test::TestQueues) return count.load(); }; } + +TEMPLATE_LIST_TEST_CASE("isQueue", "[queue]", alpaka::test::TestQueues) +{ + using DevQueue = TestType; + using Fixture = alpaka::test::QueueTestFixture; + Fixture f; + + REQUIRE(alpaka::isQueue); +}