mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
[7/n] Internal 4GB allocator
- rename getBase to getCpuBase - change some test names accordingly. Change-Id: I6fb2e4714298250147ea7766a916d7f5d62edc54
This commit is contained in:

committed by
sys_ocldev

parent
cfe1f72dcb
commit
1602fa5a88
@ -28,7 +28,7 @@ using namespace OCLRT;
|
||||
|
||||
TEST(LinearStreamCtorTest, establishInitialValues) {
|
||||
LinearStream linearStream;
|
||||
EXPECT_EQ(nullptr, linearStream.getBase());
|
||||
EXPECT_EQ(nullptr, linearStream.getCpuBase());
|
||||
EXPECT_EQ(0u, linearStream.getMaxAvailableSpace());
|
||||
}
|
||||
|
||||
@ -97,14 +97,14 @@ TEST_F(LinearStreamTest, testGetUsed) {
|
||||
EXPECT_EQ(sizeToAllocate, linearStream.getUsed());
|
||||
}
|
||||
|
||||
TEST_F(LinearStreamTest, testGetBase) {
|
||||
ASSERT_EQ(pCmdBuffer, linearStream.getBase());
|
||||
TEST_F(LinearStreamTest, givenLinearStreamWhenGetCpuBaseIsCalledThenCpuBaseAddressIsReturned) {
|
||||
ASSERT_EQ(pCmdBuffer, linearStream.getCpuBase());
|
||||
}
|
||||
|
||||
TEST_F(LinearStreamTest, testReplaceBuffer) {
|
||||
char buffer[256];
|
||||
linearStream.replaceBuffer(buffer, sizeof(buffer));
|
||||
EXPECT_EQ(buffer, linearStream.getBase());
|
||||
EXPECT_EQ(buffer, linearStream.getCpuBase());
|
||||
EXPECT_EQ(sizeof(buffer), linearStream.getAvailableSpace());
|
||||
EXPECT_EQ(0u, linearStream.getUsed());
|
||||
}
|
||||
|
Reference in New Issue
Block a user