2018-07-06 15:07:42 +08:00
|
|
|
/*
|
2019-02-27 18:39:32 +08:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-07-06 15:07:42 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-07-06 15:07:42 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "runtime/gmm_helper/gmm_helper.h"
|
|
|
|
#include "runtime/helpers/options.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2018-07-06 15:07:42 +08:00
|
|
|
#include "gmm_client_context.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
#include "gmm_memory.h"
|
2018-07-06 15:07:42 +08:00
|
|
|
#include "gtest/gtest.h"
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
using namespace NEO;
|
2018-07-06 15:07:42 +08:00
|
|
|
class PublicGmmMemory : public GmmMemory {
|
|
|
|
public:
|
|
|
|
using GmmMemory::clientContext;
|
|
|
|
};
|
|
|
|
|
2018-07-23 16:06:00 +08:00
|
|
|
TEST(GmmMemoryTest, givenGmmHelperWhenCreateGmmMemoryThenItHasClientContextFromGmmHelper) {
|
2018-07-23 18:23:48 +08:00
|
|
|
ASSERT_NE(nullptr, GmmHelper::getClientContext());
|
2018-07-06 15:07:42 +08:00
|
|
|
PublicGmmMemory gmmMemory;
|
2018-07-23 18:23:48 +08:00
|
|
|
EXPECT_EQ(gmmMemory.clientContext, GmmHelper::getClientContext()->getHandle());
|
2018-07-06 15:07:42 +08:00
|
|
|
}
|