/* * Copyright (C) 2020-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "shared/source/helpers/options.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/ult_hw_config.h" #include "shared/test/common/helpers/variable_backup.h" #include "shared/test/common/mocks/mock_device.h" #include "gtest/gtest.h" using namespace NEO; TEST(DeviceGenEngineTest, givenNonHwCsrModeWhenGetEngineThenDefaultEngineIsReturned) { DebugManagerStateRestore dbgRestorer; DebugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_AUB); VariableBackup backup(&ultHwConfig); ultHwConfig.useHwCsr = true; auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); auto &internalEngine = device->getInternalEngine(); auto &defaultEngine = device->getDefaultEngine(); EXPECT_EQ(defaultEngine.commandStreamReceiver, internalEngine.commandStreamReceiver); }