mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-01 04:23:00 +08:00
Related-To: NEO-4208 Change-Id: Iec8c6bedfd4a3fce160651768fb45f74cf3a36e8 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
31 lines
751 B
C++
31 lines
751 B
C++
/*
|
|
* Copyright (C) 2017-2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "core/unit_tests/helpers/ult_hw_config.h"
|
|
#include "runtime/platform/platform.h"
|
|
#include "test.h"
|
|
#include "unit_tests/helpers/variable_backup.h"
|
|
#include "unit_tests/mocks/mock_platform.h"
|
|
|
|
using namespace NEO;
|
|
|
|
struct PlatformNegativeTest : public ::testing::Test {
|
|
void SetUp() override {
|
|
pPlatform.reset(new MockPlatform());
|
|
}
|
|
|
|
std::unique_ptr<Platform> pPlatform;
|
|
};
|
|
|
|
TEST_F(PlatformNegativeTest, GivenPlatformWhenGetDevicesFailedThenFalseIsReturned) {
|
|
VariableBackup<UltHwConfig> backup{&ultHwConfig};
|
|
ultHwConfig.mockedGetDevicesFuncResult = false;
|
|
|
|
auto ret = pPlatform->initialize();
|
|
EXPECT_FALSE(ret);
|
|
}
|