mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
ULT renaming: Address Mapper tests
Related-To: NEO-2236 Change-Id: I8d65d73539533becb5a519c1730db0d4f0bd2691 Signed-off-by: Adam Cetnerowski <adam.cetnerowski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
e7e0529bd5
commit
4d63405127
@ -30,7 +30,7 @@ class AddressMapperFixture {
|
||||
|
||||
typedef Test<AddressMapperFixture> AddressMapperTests;
|
||||
|
||||
TEST_F(AddressMapperTests, mapAlignedPointers) {
|
||||
TEST_F(AddressMapperTests, GivenAlignedPointersWhenMappingThenPointersAreAligned) {
|
||||
uint32_t m1 = mapper->map((void *)0x1000, MemoryConstants::pageSize);
|
||||
EXPECT_EQ(0x1000u, m1);
|
||||
uint32_t m2 = mapper->map((void *)0x3000, MemoryConstants::pageSize);
|
||||
@ -39,7 +39,7 @@ TEST_F(AddressMapperTests, mapAlignedPointers) {
|
||||
EXPECT_EQ(0x1000u, m3);
|
||||
}
|
||||
|
||||
TEST_F(AddressMapperTests, mapNotAlignedPointers) {
|
||||
TEST_F(AddressMapperTests, GivenUnalignedPointersWhenMappingThenPointersAreAligned) {
|
||||
void *vm1 = (void *)(0x1100);
|
||||
void *vm2 = (void *)(0x4100);
|
||||
|
||||
@ -51,14 +51,14 @@ TEST_F(AddressMapperTests, mapNotAlignedPointers) {
|
||||
EXPECT_EQ(0x1000u, m3);
|
||||
}
|
||||
|
||||
TEST_F(AddressMapperTests, mapThenResize) {
|
||||
TEST_F(AddressMapperTests, WhenResizingThenPointerIsAligned) {
|
||||
uint32_t m1 = mapper->map((void *)0x1000, MemoryConstants::pageSize);
|
||||
EXPECT_EQ(0x1000u, m1);
|
||||
uint32_t m2 = mapper->map((void *)0x1000, 2 * MemoryConstants::pageSize);
|
||||
EXPECT_EQ(0x2000u, m2);
|
||||
}
|
||||
|
||||
TEST_F(AddressMapperTests, unmapNotMapped) {
|
||||
TEST_F(AddressMapperTests, WhenUnmappingThenMappingWorksCorrectly) {
|
||||
mapper->unmap((void *)0x1000);
|
||||
uint32_t m1 = mapper->map((void *)0x2000, MemoryConstants::pageSize);
|
||||
EXPECT_EQ(0x1000u, m1);
|
||||
|
Reference in New Issue
Block a user