mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 07:08:04 +08:00
Correct nullptr SVM arg handling
Related-To: NEO-5001 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
147dc0fbc8
commit
6f2a8e8a1c
@@ -39,3 +39,18 @@ TEST(SvmObjectArgTest, givenMultiGraphicsAllocationWhenCreatingSvmObjectArgThenP
|
||||
EXPECT_EQ(multiGraphicsAllocation.getAllocationType(), svmObjectArg.getAllocationType());
|
||||
EXPECT_EQ(&multiGraphicsAllocation, svmObjectArg.getMultiDeviceSvmAlloc());
|
||||
}
|
||||
|
||||
TEST(SvmObjectArgTest, givenNullPtrAllocationWhenGettingGraphicsAllocationFromSvmObjectArgThenNullptrIsReturned) {
|
||||
{
|
||||
GraphicsAllocation *nullGraphicsAllocation = nullptr;
|
||||
SvmObjectArg svmObjectArg(nullGraphicsAllocation);
|
||||
|
||||
EXPECT_EQ(nullptr, svmObjectArg.getGraphicsAllocation(0u));
|
||||
}
|
||||
{
|
||||
MultiGraphicsAllocation *nullMultiGraphicsAllocation = nullptr;
|
||||
SvmObjectArg svmObjectArg(nullMultiGraphicsAllocation);
|
||||
|
||||
EXPECT_EQ(nullptr, svmObjectArg.getGraphicsAllocation(0u));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user