1 /*
2  * Copyright (C) 2018-2021 Intel Corporation
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  */
7 
8 #include "shared/source/memory_manager/memory_pool.h"
9 
10 #include "gtest/gtest.h"
11 
TEST(MemoryPool,givenSystemMemoryPoolTypesWhenIsSystemMemoryPoolIsCalledThenTrueIsReturned)12 TEST(MemoryPool, givenSystemMemoryPoolTypesWhenIsSystemMemoryPoolIsCalledThenTrueIsReturned) {
13     EXPECT_TRUE(MemoryPool::isSystemMemoryPool(MemoryPool::System4KBPages));
14     EXPECT_TRUE(MemoryPool::isSystemMemoryPool(MemoryPool::System4KBPagesWith32BitGpuAddressing));
15     EXPECT_TRUE(MemoryPool::isSystemMemoryPool(MemoryPool::System64KBPages));
16     EXPECT_TRUE(MemoryPool::isSystemMemoryPool(MemoryPool::System64KBPagesWith32BitGpuAddressing));
17 }
18 
TEST(MemoryPool,givenNonSystemMemoryPoolTypesWhenIsSystemMemoryPoolIsCalledThenFalseIsReturned)19 TEST(MemoryPool, givenNonSystemMemoryPoolTypesWhenIsSystemMemoryPoolIsCalledThenFalseIsReturned) {
20     EXPECT_FALSE(MemoryPool::isSystemMemoryPool(MemoryPool::MemoryNull));
21     EXPECT_FALSE(MemoryPool::isSystemMemoryPool(MemoryPool::SystemCpuInaccessible));
22     EXPECT_FALSE(MemoryPool::isSystemMemoryPool(MemoryPool::LocalMemory));
23 }
24