mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Clean-Up unused code related to GMock
This commit: - Removes usings e.g. ::testing::Return - Removes unnecessary gmock inclues - Replaces Gmock macros (e.g. EXPECT_THAT) with our custom implementations Related-To: NEO-4941 Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
a23bfbc8ed
commit
3d8effcd69
@ -23,13 +23,13 @@
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
#include "shared/test/common/os_interface/linux/device_command_stream_fixture.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
#include "shared/test/unit_test/helpers/gtest_helpers.h"
|
||||
|
||||
#include "opencl/source/command_queue/command_queue.h"
|
||||
#include "opencl/source/platform/platform.h"
|
||||
#include "opencl/test/unit_test/linux/drm_wrap.h"
|
||||
#include "opencl/test/unit_test/linux/mock_os_layer.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "os_inc.h"
|
||||
|
||||
@ -550,7 +550,7 @@ TEST_F(DrmTests, GivenUnknownDeviceWhenCreatingDrmThenNullIsReturned) {
|
||||
auto drm = DrmWrap::createDrm(*rootDeviceEnvironment);
|
||||
EXPECT_EQ(drm, nullptr);
|
||||
std::string errStr = ::testing::internal::GetCapturedStderr();
|
||||
EXPECT_THAT(errStr, ::testing::HasSubstr(std::string("FATAL: Unknown device: deviceId: ffffffff, revisionId: 0000")));
|
||||
EXPECT_TRUE(hasSubstr(errStr, std::string("FATAL: Unknown device: deviceId: ffffffff, revisionId: 0000")));
|
||||
::testing::internal::GetCapturedStdout();
|
||||
}
|
||||
|
||||
@ -769,7 +769,7 @@ TEST_F(DrmTests, givenEnabledDebuggingAndVmBindNotAvailableWhenDrmIsCreatedThenP
|
||||
::testing::internal::GetCapturedStdout();
|
||||
std::string errStr = ::testing::internal::GetCapturedStderr();
|
||||
|
||||
EXPECT_THAT(errStr, ::testing::HasSubstr(std::string("WARNING: Debugging not supported\n")));
|
||||
EXPECT_TRUE(hasSubstr(errStr, std::string("WARNING: Debugging not supported\n")));
|
||||
}
|
||||
|
||||
TEST_F(DrmTests, givenDrmIsCreatedWhenCreateVirtualMemoryFailsThenReturnVirtualMemoryIdZeroAndPrintDebugMessage) {
|
||||
@ -790,8 +790,7 @@ TEST_F(DrmTests, givenDrmIsCreatedWhenCreateVirtualMemoryFailsThenReturnVirtualM
|
||||
|
||||
std::string errStr = ::testing::internal::GetCapturedStderr();
|
||||
if (!drm->isPerContextVMRequired()) {
|
||||
|
||||
EXPECT_THAT(errStr, ::testing::HasSubstr(std::string("INFO: Device doesn't support GEM Virtual Memory")));
|
||||
EXPECT_TRUE(hasSubstr(errStr, std::string("INFO: Device doesn't support GEM Virtual Memory")));
|
||||
}
|
||||
::testing::internal::GetCapturedStdout();
|
||||
}
|
||||
|
Reference in New Issue
Block a user