Skip to content

Commit 2826576

Browse files
author
aidan.belton
committed
Set test_contexts to use std::optional
1 parent aa27c35 commit 2826576

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/unittests/pi/cuda/test_contexts.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ using namespace cl::sycl;
2525
struct CudaContextsTest : public ::testing::Test {
2626

2727
protected:
28-
detail::plugin *plugin = pi::initializeAndGet(backend::cuda);
28+
std::optional<detail::plugin> plugin = pi::initializeAndGet(backend::cuda);
2929

3030
pi_platform platform_;
3131
pi_device device_;
3232

3333
void SetUp() override {
3434
// skip the tests if the CUDA backend is not available
35-
if (!plugin) {
35+
if (!plugin.has_value()) {
3636
GTEST_SKIP();
3737
}
3838

0 commit comments

Comments
 (0)