Skip to content

Commit 1310d09

Browse files
Fixed is_unknown function
1 parent 065e28e commit 1310d09

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libsyclinterface/tests/test_sycl_usm_interface.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,9 @@ TEST_F(TestDPCTLSyclUSMNullArgs, ChkPointerQueries)
235235
DPCTLSyclContextRef Null_CRef = nullptr;
236236
DPCTLSyclUSMRef Null_MRef = nullptr;
237237
DPCTLSyclUSMType t = DPCTLSyclUSMType::DPCTL_USM_UNKNOWN;
238-
auto is_unknown = [=](const char *t) -> bool {
239-
return strncmp(t, "unknown", 7) == 0;
238+
const char *t = nullptr;
239+
auto is_unknown = [=](DPCTLSyclUSMType t_) -> bool {
240+
return t_ == DPCTLSyclUSMType::DPCTL_USM_UNKNOWN;
240241
};
241242

242243
EXPECT_NO_FATAL_FAILURE(t = DPCTLUSM_GetPointerType(Null_MRef, Null_CRef));

0 commit comments

Comments
 (0)