mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 07:00:17 +08:00
Updating files modified in 2018 only. Older files remain with old style copyright header Change-Id: Ic99f2e190ad74b4b7f2bd79dd7b9fa5fbe36ec92 Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
33 lines
734 B
C++
33 lines
734 B
C++
/*
|
|
* Copyright (C) 2017-2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "runtime/helpers/options.h"
|
|
#include "runtime/platform/platform.h"
|
|
#include "unit_tests/helpers/variable_backup.h"
|
|
#include "test.h"
|
|
|
|
using namespace OCLRT;
|
|
|
|
namespace OCLRT {
|
|
extern bool getDevicesResult;
|
|
}; // namespace OCLRT
|
|
|
|
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);
|
|
}
|