Files
compute-runtime/unit_tests/memory_manager/memory_pool_tests.cpp
Jobczyk, Lukasz cbc04629fd Move memory pool to the core dir
Related-To: NEO-3677

Change-Id: I04fce78640cb0bfc26ad8950261324d997cd113a
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-09-13 09:56:21 +02:00

24 lines
950 B
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "core/memory_manager/memory_pool.h"
#include "gtest/gtest.h"
TEST(MemoryPool, givenSystemMemoryPoolTypesWhenIsSystemMemoryPoolIsCalledThenTrueIsReturned) {
EXPECT_TRUE(MemoryPool::isSystemMemoryPool(MemoryPool::System4KBPages));
EXPECT_TRUE(MemoryPool::isSystemMemoryPool(MemoryPool::System4KBPagesWith32BitGpuAddressing));
EXPECT_TRUE(MemoryPool::isSystemMemoryPool(MemoryPool::System64KBPages));
EXPECT_TRUE(MemoryPool::isSystemMemoryPool(MemoryPool::System64KBPagesWith32BitGpuAddressing));
}
TEST(MemoryPool, givenNonSystemMemoryPoolTypesWhenIsSystemMemoryPoolIsCalledThenFalseIsReturned) {
EXPECT_FALSE(MemoryPool::isSystemMemoryPool(MemoryPool::MemoryNull));
EXPECT_FALSE(MemoryPool::isSystemMemoryPool(MemoryPool::SystemCpuInaccessible));
EXPECT_FALSE(MemoryPool::isSystemMemoryPool(MemoryPool::LocalMemory));
}