2018-05-11 15:44:37 +08:00
|
|
|
/*
|
2020-01-31 21:35:46 +08:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2018-05-11 15:44:37 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-05-11 15:44:37 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-11-07 01:14:30 +08:00
|
|
|
#include "core/execution_environment/root_device_environment.h"
|
2019-11-29 22:41:47 +08:00
|
|
|
#include "core/helpers/hw_info.h"
|
2020-02-13 20:26:40 +08:00
|
|
|
#include "core/os_interface/os_interface.h"
|
2020-01-31 21:35:46 +08:00
|
|
|
#include "core/os_interface/windows/wddm/wddm.h"
|
2019-07-15 19:51:08 +08:00
|
|
|
#include "core/unit_tests/helpers/debug_manager_state_restore.h"
|
2018-05-11 15:44:37 +08:00
|
|
|
#include "test.h"
|
2019-11-07 01:14:30 +08:00
|
|
|
#include "unit_tests/mocks/mock_execution_environment.h"
|
2018-05-11 15:44:37 +08:00
|
|
|
|
2018-05-18 16:18:16 +08:00
|
|
|
#include <typeinfo>
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
using namespace NEO;
|
2018-05-11 15:44:37 +08:00
|
|
|
|
2018-05-18 16:18:16 +08:00
|
|
|
TEST(wddmCreateTests, givenInputVersionWhenCreatingThenCreateRequestedObject) {
|
2019-11-07 01:14:30 +08:00
|
|
|
MockExecutionEnvironment executionEnvironment;
|
|
|
|
RootDeviceEnvironment rootDeviceEnvironment(executionEnvironment);
|
2020-02-17 23:14:22 +08:00
|
|
|
auto hwDeviceIds = OSInterface::discoverDevices();
|
|
|
|
std::unique_ptr<Wddm> wddm(Wddm::createWddm(std::move(hwDeviceIds[0]), rootDeviceEnvironment));
|
2018-08-14 17:05:17 +08:00
|
|
|
EXPECT_EQ(typeid(*wddm.get()), typeid(Wddm));
|
2018-05-11 15:44:37 +08:00
|
|
|
}
|