mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-14 02:32:59 +08:00
- address_patch.h - options.h - registered_method_dispatcher.h - grf_config.h Rename OCL_RUNTIME_PROFILING -> KMD_PROFILING Related-To: NEO-3982 Change-Id: I06cf72729e9d7d7d2ff0bd169fcbada00c4b509a Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#if defined(_WIN32)
|
|
#include "core/os_interface/os_library.h"
|
|
#include "core/unit_tests/helpers/debug_manager_state_restore.h"
|
|
#include "runtime/os_interface/windows/gdi_interface.h"
|
|
#include "test.h"
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
TEST(GdiInterface, creation) {
|
|
NEO::Gdi gdi;
|
|
ASSERT_TRUE(gdi.isInitialized());
|
|
}
|
|
|
|
TEST(GdiInterface, failLoad) {
|
|
const char *oldName = Os::gdiDllName;
|
|
Os::gdiDllName = "surely_not_exists_.dll";
|
|
|
|
NEO::Gdi gdi;
|
|
EXPECT_FALSE(gdi.isInitialized());
|
|
|
|
Os::gdiDllName = oldName;
|
|
}
|
|
|
|
TEST(GdiInterface, givenGdiOverridePathWhenGdiInterfaceIsCalledThenOverridePathIsUsed) {
|
|
const char *oldName = Os::gdiDllName;
|
|
|
|
DebugManagerStateRestore dbgRestorer;
|
|
|
|
Os::gdiDllName = "surely_not_exists_.dll";
|
|
DebugManager.flags.OverrideGdiPath.set(oldName);
|
|
|
|
NEO::Gdi gdi;
|
|
EXPECT_TRUE(gdi.isInitialized());
|
|
|
|
Os::gdiDllName = oldName;
|
|
}
|
|
|
|
TEST(ThkWrapperTest, givenThkWrapperWhenConstructedThenmFuncIsInitialized) {
|
|
NEO::ThkWrapper<void *> wrapper;
|
|
EXPECT_EQ(nullptr, wrapper.mFunc);
|
|
}
|
|
#endif
|