mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add control on platform life cycle.
Change-Id: I5c24b41747d822b71dd57e9a949cf25fcc78a453
This commit is contained in:

committed by
sys_ocldev

parent
0f91c3bc47
commit
a21c0a0074
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "runtime/platform/platform.h"
|
||||
#include "unit_tests/mocks/mock_context.h"
|
||||
#include "unit_tests/mocks/mock_device.h"
|
||||
#include "unit_tests/mocks/mock_kernel.h"
|
||||
@ -30,6 +31,7 @@ using namespace OCLRT;
|
||||
class PatchedKernelTest : public ::testing::Test {
|
||||
public:
|
||||
void SetUp() override {
|
||||
constructPlatform();
|
||||
device.reset(MockDevice::create<MockDevice>(nullptr));
|
||||
context.reset(new MockContext(device.get()));
|
||||
program.reset(Program::create("FillBufferBytes", context.get(), *device.get(), true, &retVal));
|
||||
@ -41,6 +43,7 @@ class PatchedKernelTest : public ::testing::Test {
|
||||
}
|
||||
void TearDown() override {
|
||||
context.reset();
|
||||
platformImpl.reset(nullptr);
|
||||
}
|
||||
|
||||
std::unique_ptr<MockContext> context;
|
||||
|
Reference in New Issue
Block a user