mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Update getAllocationTypeString method
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
e939e97384
commit
abade55c2d
@ -926,6 +926,22 @@ TEST(AllocationTypeLoggingSingle, givenGraphicsAllocationTypeWhenConvertingToStr
|
||||
EXPECT_STREQ(result, "ILLEGAL_VALUE");
|
||||
}
|
||||
|
||||
TEST(AllocationTypeLoggingSingle, givenAllocationTypeWhenConvertingToStringThenSupportAll) {
|
||||
std::string testFile = "testfile";
|
||||
DebugVariables flags;
|
||||
FullyEnabledFileLogger fileLogger(testFile, flags);
|
||||
|
||||
GraphicsAllocation graphicsAllocation(0, GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 0ull, 0ull, 0, MemoryPool::MemoryNull);
|
||||
|
||||
for (uint32_t i = 0; i < static_cast<uint32_t>(GraphicsAllocation::AllocationType::COUNT); i++) {
|
||||
graphicsAllocation.setAllocationType(static_cast<GraphicsAllocation::AllocationType>(i));
|
||||
|
||||
auto result = fileLogger.getAllocationTypeString(&graphicsAllocation);
|
||||
|
||||
EXPECT_STRNE(result, "ILLEGAL_VALUE");
|
||||
}
|
||||
}
|
||||
|
||||
TEST(AllocationTypeLoggingSingle, givenDisabledDebugFunctionalityWhenGettingGraphicsAllocationTypeThenNullptrReturned) {
|
||||
std::string testFile = "testfile";
|
||||
DebugVariables flags;
|
||||
|
Reference in New Issue
Block a user