Files
compute-runtime/unit_tests/platform/platform_negative_tests.cpp
Mateusz Jablonski 5fa53f4516 Move headers to core
- 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>
2019-12-10 12:19:29 +01:00

33 lines
725 B
C++

/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "core/helpers/options.h"
#include "runtime/platform/platform.h"
#include "test.h"
#include "unit_tests/helpers/variable_backup.h"
using namespace NEO;
namespace NEO {
extern bool getDevicesResult;
}; // namespace NEO
struct PlatformNegativeTest : public ::testing::Test {
void SetUp() override {
pPlatform.reset(new Platform());
}
std::unique_ptr<Platform> pPlatform;
};
TEST_F(PlatformNegativeTest, GivenPlatformWhenGetDevicesFailedThenFalseIsReturned) {
VariableBackup<decltype(getDevicesResult)> bkp(&getDevicesResult, false);
auto ret = pPlatform->initialize();
EXPECT_FALSE(ret);
}