Skip to content

Commit

Permalink
add tests for isQueue and isDevice
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraPerego committed Jul 16, 2024
1 parent 690324e commit 690019d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/unit/dev/src/DevWarpSizeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<TestType>{};
auto const dev = alpaka::getDevByIdx(platform, 0);
REQUIRE(alpaka::isDevice<decltype(dev)>);
}
9 changes: 9 additions & 0 deletions test/unit/queue/src/QueueTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<DevQueue>;
Fixture f;

REQUIRE(alpaka::isQueue<decltype(f.m_queue)>);
}

0 comments on commit 690019d

Please sign in to comment.