Add missing test for createSharedBuffer.

Change-Id: I1aefac11ba078d1d6cebe3b76c3fcd7d36972199
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
Mrozek, Michal 2018-04-12 14:05:44 +02:00 committed by sys_ocldev
parent bf799d99e0
commit 9fa22e7fd2
2 changed files with 12 additions and 1 deletions

2
Jenkinsfile vendored
View File

@ -1,5 +1,5 @@
#!groovy
neoDependenciesRev='755799-928'
strategy='EQUAL'
allowedF=1
allowedF=0
allowedCD=301

View File

@ -752,6 +752,17 @@ TEST(Buffers64on32Tests, given32BitBufferThatIsCreatedWithUseHostPtrButIsNotZero
}
}
TEST(SharedBuffersTest, whenBuffersIsCreatedWithSharingHandlerThenItIsSharedBuffer) {
MockContext context;
auto memoryManager = context.getDevice(0)->getMemoryManager();
auto handler = new SharingHandler();
auto graphicsAlloaction = memoryManager->allocateGraphicsMemory(4096);
auto buffer = Buffer::createSharedBuffer(&context, CL_MEM_READ_ONLY, handler, graphicsAlloaction);
ASSERT_NE(nullptr, buffer);
EXPECT_EQ(handler, buffer->peekSharingHandler());
buffer->release();
}
class BufferTests : public ::testing::Test {
protected:
void SetUp() override {