Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[AUTO][HETERO][TESTS] Replace 'std::tie' with structured bindings where possible (#31565)

Egor Duplenskii4fd3d42eacd3
diff --git a/src/plugins/auto/tests/functional/behavior/infer_consistency_test.hpp b/src/plugins/auto/tests/functional/behavior/infer_consistency_test.hpp
index c901d922237..63db57f15e4 100644
--- a/src/plugins/auto/tests/functional/behavior/infer_consistency_test.hpp
+++ b/src/plugins/auto/tests/functional/behavior/infer_consistency_test.hpp
@@ -27,10 +27,7 @@ class Consistency_Test : public AutoFuncTests, public testing::WithParamInterfac
public:
static std::string getTestCaseName(const testing::TestParamInfo<consistency_test_param>& obj) {
- ov::AnyMap property;
- bool use_get_tensor;
- std::string target_device;
- std::tie(target_device, use_get_tensor, property) = obj.param;
+ const auto& [target_device, use_get_tensor, property] = obj.param;
std::ostringstream result;
result << "target_device=" << target_device << "_";
result << std::string(use_get_tensor ? "_get_blob" : "_set_blob") << "_";
diff --git a/src/plugins/auto/tests/functional/behavior/infer_schedule_test.cpp b/src/plugins/auto/tests/functional/behavior/infer_schedule_test.cpp
index 821b3b4d375..e9e056e9e48 100644
--- a/src/plugins/auto/tests/functional/behavior/infer_schedule_test.cpp
+++ b/src/plugins/auto/tests/functional/behavior/infer_schedule_test.cpp
@@ -18,9 +18,7 @@ public:
std::tie(property, niters) = this->GetParam();
}
static std::string getTestCaseName(const testing::TestParamInfo<schedule_policy_param>& obj) {
- ov::AnyMap property;
- int niters;
- std::tie(property, niters) = obj.param;
+ const auto& [property, niters] = obj.param;
std::ostringstream result;
result << "numberOfInfer=" << niters << "_";
if (!property.empty()) {
diff --git a/src/plugins/auto/tests/functional/behavior/io_tensor.hpp b/src/plugins/auto/tests/functional/behavior/io_tensor.hpp
index 63942f86272..98942bf33e9 100644
--- a/src/plugins/auto/tests/functional/behavior/io_tensor.hpp
+++ b/src/plugins/auto/tests/functional/behavior/io_tensor.hpp
@@ -23,9 +23,7 @@ using test_params = std::tuple<std::string, ov::AnyMap>;
class InferRequest_IOTensor_Test : public AutoFuncTests, public ::testing::WithParamInterface<test_params> {
public:
static std::string getTestCaseName(testing::TestParamInfo<test_params> obj) {
- std::string target_device;
- ov::AnyMap configuration;
- std::tie(target_device, configuration) = obj.param;
+ const auto& [target_device, configuration] = obj.param;
std::ostringstream result;
result << "target_device=" << target_device << "_";
if (!configuration.empty()) {
diff --git a/src/plugins/auto/tests/unit/compile_model_metric_test.cpp b/src/plugins/auto/tests/unit/compile_model_metric_test.cpp
index 99469c9acd5..c5637139c9c 100644
--- a/src/plugins/auto/tests/unit/compile_model_metric_test.cpp
+++ b/src/plugins/auto/tests/unit/compile_model_metric_test.cpp
@@ -27,30 +27,18 @@ class ExecNetworkget_propertyOptimalNumInferReq : public tests::AutoTest,
public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- unsigned int cpuOptimalNum;
- int cpuCustomerNum;
- unsigned int actualOptimalNum;
- int actualCustomerNum;
- unsigned int expectOptimalNum;
- bool cpuSleep;
- bool actualSleep;
- bool isThroughput;
- int gpuPerfHintNum;
- bool isSupportOptimalNum;
- bool isSupportNumRequests;
- std::string actualDeviceName;
- std::tie(isThroughput,
- cpuOptimalNum,
- cpuCustomerNum,
- cpuSleep,
- actualOptimalNum,
- actualCustomerNum,
- actualSleep,
- actualDeviceName,
- expectOptimalNum,
- gpuPerfHintNum,
- isSupportOptimalNum,
- isSupportNumRequests) = obj.param;
+ const auto& [isThroughput,
+ cpuOptimalNum,
+ cpuCustomerNum,
+ cpuSleep,
+ actualOptimalNum,
+ actualCustomerNum,
+ actualSleep,
+ actualDeviceName,
+ expectOptimalNum,
+ gpuPerfHintNum,
+ isSupportOptimalNum,
+ isSupportNumRequests] = obj.param;
std::ostringstream result;
result << "cpuOptimalNum_" << cpuOptimalNum << "cpuCustomerNum_" << cpuCustomerNum;
result << "actualOptimalNum_" << actualOptimalNum << "actualCustomerNum_" << actualCustomerNum;
@@ -108,12 +96,7 @@ class ExecNetworkget_propertyOtherTest : public tests::AutoTest,
public ::testing::TestWithParam<modelPrioPerfHintTestParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<modelPrioPerfHintTestParams> obj) {
- bool isNewAPI;
- bool actualSleep;
- std::string actualDeviceName;
- ov::Any performanceMode;
- ov::Any modelPriority;
- std::tie(isNewAPI, actualSleep, actualDeviceName, performanceMode, modelPriority) = obj.param;
+ const auto& [isNewAPI, actualSleep, actualDeviceName, performanceMode, modelPriority] = obj.param;
std::ostringstream result;
if (isNewAPI) {
result << "_isNewAPI_"
@@ -137,30 +120,21 @@ public:
};
TEST_P(ExecNetworkget_propertyOptimalNumInferReq, OPTIMAL_NUMBER_OF_INFER_REQUESTS) {
- unsigned int cpuOptimalNum;
- int cpuCustomerNum;
- unsigned int actualOptimalNum;
- int actualCustomerNum;
- unsigned int expectOptimalNum;
- bool cpuSleep;
- bool actualSleep;
- bool isThroughput;
- unsigned int gpuPerfHintNum;
- bool isSupportedOptimalNum;
- bool isSupportNumRequests;
- std::string actualDeviceName;
- std::tie(isThroughput,
- cpuOptimalNum,
- cpuCustomerNum,
- cpuSleep,
- actualOptimalNum,
- actualCustomerNum,
- actualSleep,
- actualDeviceName,
- expectOptimalNum,
- gpuPerfHintNum,
- isSupportedOptimalNum,
- isSupportNumRequests) = this->GetParam();
+ const auto& [isThroughput,
+ _cpuOptimalNum,
+ cpuCustomerNum,
+ cpuSleep,
+ _actualOptimalNum,
+ actualCustomerNum,
+ actualSleep,
+ actualDeviceName,
+ expectOptimalNum,
+ _gpuPerfHintNum,
+ isSupportedOptimalNum,
+ isSupportNumRequests] = this->GetParam();
+ const auto& cpuOptimalNum = _cpuOptimalNum;
+ const auto& actualOptimalNum = _actualOptimalNum;
+ const auto& gpuPerfHintNum = _gpuPerfHintNum;
config.insert(ov::device::priorities(ov::test::utils::DEVICE_CPU + std::string(",") + actualDeviceName));
std::vector<ov::PropertyName> supported_props = {ov::range_for_streams,
ov::optimal_batch_size,
@@ -362,12 +336,7 @@ class ExecNetworkGetMetricOtherTest : public tests::AutoTest,
public ::testing::TestWithParam<modelPrioPerfHintTestParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<modelPrioPerfHintTestParams> obj) {
- bool isNewAPI;
- bool actualSleep;
- std::string actualDeviceName;
- ov::Any performanceMode;
- ov::Any modelPriority;
- std::tie(isNewAPI, actualSleep, actualDeviceName, performanceMode, modelPriority) = obj.param;
+ const auto& [isNewAPI, actualSleep, actualDeviceName, performanceMode, modelPriority] = obj.param;
std::ostringstream result;
if (isNewAPI) {
result << "_isNewAPI_"
@@ -393,12 +362,8 @@ public:
TEST_P(ExecNetworkGetMetricOtherTest, modelPriority_perfHint_exclusiveAsyncReq_test) {
unsigned int cpuOptimalNum = 3;
unsigned int actualOptimalNum = 2;
- bool isNewAPI;
- bool actualSleep;
- std::string actualDeviceName;
- ov::Any performanceHint;
- ov::Any modelPriority;
- std::tie(isNewAPI, actualSleep, actualDeviceName, performanceHint, modelPriority) = this->GetParam();
+
+ const auto& [isNewAPI, actualSleep, actualDeviceName, performanceHint, modelPriority] = this->GetParam();
config.insert(ov::device::priorities(ov::test::utils::DEVICE_CPU + std::string(",") + actualDeviceName));
config.insert(ov::hint::performance_mode(performanceHint.as<ov::hint::PerformanceMode>()));
config.insert({ov::hint::model_priority.name(), modelPriority.as<std::string>()});
diff --git a/src/plugins/auto/tests/unit/compile_model_property_test.cpp b/src/plugins/auto/tests/unit/compile_model_property_test.cpp
index 00c7903f244..74acd7f3e58 100644
--- a/src/plugins/auto/tests/unit/compile_model_property_test.cpp
+++ b/src/plugins/auto/tests/unit/compile_model_property_test.cpp
@@ -33,10 +33,7 @@ static std::vector<ConfigParams> testConfigs;
class LoadNetworkWithSecondaryConfigsMockTest : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- std::string deviceName;
- std::vector<std::string> targetDevices;
- ov::AnyMap deviceConfigs;
- std::tie(deviceName, targetDevices, deviceConfigs) = obj.param;
+ const auto& [deviceName, targetDevices, deviceConfigs] = obj.param;
std::ostringstream result;
result << "_virtual_device_" << deviceName;
result << "_loadnetwork_to_device_";
@@ -127,9 +124,8 @@ public:
};
TEST_P(LoadNetworkWithSecondaryConfigsMockTest, LoadNetworkWithSecondaryConfigsTest) {
- std::string device;
- std::vector<std::string> targetDevices;
- std::tie(device, targetDevices, config) = this->GetParam();
+ const auto& [device, targetDevices, _config] = this->GetParam();
+ config = _config;
if (device.find("AUTO") != std::string::npos)
plugin->set_device_name("AUTO");
if (device.find("MULTI") != std::string::npos)
@@ -161,9 +157,8 @@ TEST_P(LoadNetworkWithSecondaryConfigsMockTest, LoadNetworkWithSecondaryConfigsT
using AutoLoadExeNetworkFailedTest = LoadNetworkWithSecondaryConfigsMockTest;
TEST_P(AutoLoadExeNetworkFailedTest, checkLoadFailMassage) {
- std::string device;
- std::vector<std::string> targetDevices;
- std::tie(device, targetDevices, config) = this->GetParam();
+ const auto& [device, targetDevices, _config] = this->GetParam();
+ config = _config;
if (device.find("AUTO") != std::string::npos)
plugin->set_device_name("AUTO");
if (device.find("MULTI") != std::string::npos)
@@ -237,17 +232,13 @@ using PropertyTestParams = std::tuple<std::string, // virtual d
class CompiledModelPropertyMockTest : public tests::AutoTest, public ::testing::TestWithParam<PropertyTestParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<PropertyTestParams> obj) {
- std::string deviceName;
- std::string devicePriorities;
- std::map<std::string, bool> isSupportProperty;
- ov::AnyMap properties;
- std::tie(deviceName, devicePriorities, isSupportProperty, properties) = obj.param;
+ const auto& [deviceName, devicePriorities, isSupportProperty, properties] = obj.param;
std::ostringstream result;
result << "_virtual_device_" << deviceName;
result << "_loadnetwork_to_device_" << devicePriorities;
for (auto& property : properties) {
result << "_property_" << property.first;
- bool isSupport = isSupportProperty[property.first];
+ const bool isSupport = isSupportProperty.count(property.first) && isSupportProperty.at(property.first);
if (isSupport)
result << "_isSupport_No_";
else
@@ -258,11 +249,7 @@ public:
}
void SetUp() override {
- std::string deviceName;
- std::string devicePriorities;
- ov::AnyMap properties;
- std::map<std::string, bool> isSupportProperty;
- std::tie(deviceName, devicePriorities, isSupportProperty, properties) = GetParam();
+ const auto& [deviceName, devicePriorities, isSupportProperty, properties] = GetParam();
std::vector<std::string> availableDevs = {"CPU", "GPU"};
ON_CALL(*core, get_available_devices()).WillByDefault(Return(availableDevs));
std::vector<std::string> deviceIDs = {};
@@ -280,7 +267,7 @@ public:
.WillByDefault(Return(mockExeNetworkActual));
std::vector<ov::PropertyName> supported_props = {};
for (auto& property : properties) {
- bool isSupport = isSupportProperty[property.first];
+ const bool isSupport = isSupportProperty.count(property.first) && isSupportProperty.at(property.first);
if (isSupport) {
supported_props.push_back(property.first);
auto value = property.second.as<std::string>();
@@ -303,11 +290,7 @@ public:
};
TEST_P(CompiledModelPropertyMockTest, compiledModelGetPropertyNoThrow) {
- std::string deviceName;
- std::string devicePriorities;
- ov::AnyMap properties;
- std::map<std::string, bool> isSupportProperty;
- std::tie(deviceName, devicePriorities, isSupportProperty, properties) = GetParam();
+ const auto& [deviceName, devicePriorities, isSupportProperty, properties] = GetParam();
if (deviceName.find("AUTO") != std::string::npos)
plugin->set_device_name("AUTO");
if (deviceName.find("MULTI") != std::string::npos)
diff --git a/src/plugins/auto/tests/unit/ctput_test.cpp b/src/plugins/auto/tests/unit/ctput_test.cpp
index d6d7d02a006..9a44307d7ff 100644
--- a/src/plugins/auto/tests/unit/ctput_test.cpp
+++ b/src/plugins/auto/tests/unit/ctput_test.cpp
@@ -10,8 +10,7 @@ using ConfigParams = std::tuple<std::vector<std::string>>;
class LoadNetworkWithCTPUTMockTest : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- std::vector<std::string> targetDevices;
- std::tie(targetDevices) = obj.param;
+ const auto& [targetDevices] = obj.param;
std::ostringstream result;
result << "ctput_loadnetwork_to_device_";
for (auto& device : targetDevices) {
@@ -44,8 +43,7 @@ public:
};
TEST_P(LoadNetworkWithCTPUTMockTest, CTPUTSingleDevLogicTest) {
- std::vector<std::string> targetDevices;
- std::tie(targetDevices) = this->GetParam();
+ const auto& [targetDevices] = this->GetParam();
plugin->set_device_name("AUTO");
config.insert(ov::hint::performance_mode(ov::hint::PerformanceMode::CUMULATIVE_THROUGHPUT));
@@ -92,9 +90,8 @@ TEST_P(LoadNetworkWithCTPUTMockTest, CTPUTSingleDevLogicTest) {
using LoadNetworkWithCTPUTMockTestExeDevice = LoadNetworkWithCTPUTMockTest;
TEST_P(LoadNetworkWithCTPUTMockTestExeDevice, CTPUTSingleDevExecutionDevie) {
- std::vector<std::string> targetDevices;
std::shared_ptr<ov::ICompiledModel> exeNetwork;
- std::tie(targetDevices) = this->GetParam();
+ const auto& [targetDevices] = this->GetParam();
plugin->set_device_name("AUTO");
config.insert({ov::hint::performance_mode(ov::hint::PerformanceMode::CUMULATIVE_THROUGHPUT)});
@@ -129,9 +126,7 @@ using ConfigParams_1 = std::tuple<bool, std::vector<std::string>>;
class AutoCTPUTCallMulti : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams_1> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams_1> obj) {
- std::vector<std::string> targetDevices;
- bool AutoCallMulti;
- std::tie(AutoCallMulti, targetDevices) = obj.param;
+ const auto& [AutoCallMulti, targetDevices] = obj.param;
std::ostringstream result;
if (AutoCallMulti) {
result << "AutoCallMulti_";
@@ -168,10 +163,9 @@ public:
};
TEST_P(AutoCTPUTCallMulti, CTPUTDeviceLoadFailedNoExceptionThrowTest) {
- std::vector<std::string> targetDevices;
std::string targetDev;
- bool AutoCallMulti;
- std::tie(AutoCallMulti, targetDevices) = this->GetParam();
+
+ const auto& [AutoCallMulti, targetDevices] = this->GetParam();
std::string loadFailedDevice = targetDevices.size() > 0 ? targetDevices[0] : "";
std::string secondDevice = targetDevices.size() > 1 ? targetDevices[1] : "";
plugin->set_device_name("MULTI");
diff --git a/src/plugins/auto/tests/unit/default_perf_hint_test.cpp b/src/plugins/auto/tests/unit/default_perf_hint_test.cpp
index e69e3c63142..0288b88e562 100644
--- a/src/plugins/auto/tests/unit/default_perf_hint_test.cpp
+++ b/src/plugins/auto/tests/unit/default_perf_hint_test.cpp
@@ -14,10 +14,7 @@ static std::vector<ConfigParams> testConfigs;
class AutoDefaultPerfHintTest : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- std::string deviceName;
- std::vector<std::string> targetDevices;
- ov::AnyMap deviceConfigs;
- std::tie(deviceName, targetDevices, deviceConfigs) = obj.param;
+ const auto& [deviceName, targetDevices, deviceConfigs] = obj.param;
std::ostringstream result;
result << deviceName;
result << "_loadnetwork_to_";
@@ -204,11 +201,8 @@ using PerHintAndDefaultPerfHintMockTest = AutoDefaultPerfHintTest;
using SecPropAndDefaultPerfHintMockTest = AutoDefaultPerfHintTest;
TEST_P(NumStreamsAndDefaultPerfHintMockTest, NumStreamsAndDefaultPerfHintTest) {
- std::string device;
- std::vector<std::string> targetDevices;
- ov::AnyMap config;
bool bIsAuto = false;
- std::tie(device, targetDevices, config) = this->GetParam();
+ const auto& [device, targetDevices, config] = this->GetParam();
if (device.find("AUTO") != std::string::npos) {
bIsAuto = true;
plugin->set_device_name("AUTO");
@@ -269,11 +263,8 @@ INSTANTIATE_TEST_SUITE_P(
NumStreamsAndDefaultPerfHintMockTest::getTestCaseName);
TEST_P(PerHintAndDefaultPerfHintMockTest, PerfHintAndDefaultPerfHintTest) {
- std::string device;
- std::vector<std::string> targetDevices;
- ov::AnyMap config;
bool bIsAuto = false;
- std::tie(device, targetDevices, config) = this->GetParam();
+ const auto& [device, targetDevices, config] = this->GetParam();
if (device.find("AUTO") != std::string::npos) {
bIsAuto = true;
plugin->set_device_name("AUTO");
@@ -332,11 +323,8 @@ INSTANTIATE_TEST_SUITE_P(
PerHintAndDefaultPerfHintMockTest::getTestCaseName);
TEST_P(SecPropAndDefaultPerfHintMockTest, SecPropAndDefaultPerfHintTest) {
- std::string device;
- std::vector<std::string> targetDevices;
- ov::AnyMap config;
bool bIsAuto = false;
- std::tie(device, targetDevices, config) = this->GetParam();
+ const auto& [device, targetDevices, config] = this->GetParam();
if (device.find("AUTO") != std::string::npos) {
bIsAuto = true;
plugin->set_device_name("AUTO");
diff --git a/src/plugins/auto/tests/unit/dynamic_output_test.cpp b/src/plugins/auto/tests/unit/dynamic_output_test.cpp
index 6952fd5769a..a3589aabf6b 100644
--- a/src/plugins/auto/tests/unit/dynamic_output_test.cpp
+++ b/src/plugins/auto/tests/unit/dynamic_output_test.cpp
@@ -37,9 +37,7 @@ protected:
};
std::string DynamicOutputInferenceTest::getTestCaseName(testing::TestParamInfo<DynamicOutputConfigParams> obj) {
- ov::Any priorityList;
- ov::Any targetList;
- std::tie(priorityList, targetList) = obj.param;
+ const auto& [priorityList, targetList] = obj.param;
std::ostringstream result;
result << "_withList_" << priorityList.as<std::string>();
result << "_expect_";
diff --git a/src/plugins/auto/tests/unit/get_device_list.cpp b/src/plugins/auto/tests/unit/get_device_list.cpp
index b17c1c932d9..dd88e7af00b 100644
--- a/src/plugins/auto/tests/unit/get_device_list.cpp
+++ b/src/plugins/auto/tests/unit/get_device_list.cpp
@@ -16,13 +16,8 @@ using ConfigParams = std::tuple<std::vector<std::string>, // Available devices
class GetDeviceListTest : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- Params priorityAndMetaDev;
- std::string priorityDevices;
- std::string metaDevices;
- std::vector<std::string> availableDevices;
- int expectedTimes = 0;
- std::tie(availableDevices, priorityAndMetaDev) = obj.param;
- std::tie(priorityDevices, metaDevices, expectedTimes) = priorityAndMetaDev;
+ const auto& [availableDevices, priorityAndMetaDev] = obj.param;
+ const auto& [priorityDevices, metaDevices, expectedTimes] = priorityAndMetaDev;
std::ostringstream result;
result << "priorityDevices_" << priorityDevices;
result << "_expectedDevices_" << metaDevices;
@@ -48,13 +43,9 @@ public:
TEST_P(GetDeviceListTest, GetDeviceListTestWithExcludeList) {
// get Parameter
- Params priorityAndMetaDev;
- std::string priorityDevices;
- std::string metaDevices;
- std::vector<std::string> availableDevs;
- int expectedTimes = 0;
- std::tie(availableDevs, priorityAndMetaDev) = this->GetParam();
- std::tie(priorityDevices, metaDevices, expectedTimes) = priorityAndMetaDev;
+
+ const auto& [availableDevs, priorityAndMetaDev] = this->GetParam();
+ const auto& [priorityDevices, metaDevices, expectedTimes] = priorityAndMetaDev;
std::vector<std::string> deviceIDs = {"0", "1"};
if (availableDevs != availableDevsWithId) {
deviceIDs.clear();
@@ -79,13 +70,9 @@ TEST_P(GetDeviceListTest, GetDeviceListTestWithExcludeList) {
using GetDeviceListTestWithNotInteldGPU = GetDeviceListTest;
TEST_P(GetDeviceListTestWithNotInteldGPU, GetDeviceListTestWithExcludeList) {
// get Parameter
- Params priorityAndMetaDev;
- std::string priorityDevices;
- std::string metaDevices;
- std::vector<std::string> availableDevs;
- int expectedTimes = 0;
- std::tie(availableDevs, priorityAndMetaDev) = this->GetParam();
- std::tie(priorityDevices, metaDevices, expectedTimes) = priorityAndMetaDev;
+
+ const auto& [availableDevs, priorityAndMetaDev] = this->GetParam();
+ const auto& [priorityDevices, metaDevices, expectedTimes] = priorityAndMetaDev;
std::vector<std::string> deviceIDs = {"0", "1"};
if (availableDevs != availableDevsWithId) {
deviceIDs.clear();
diff --git a/src/plugins/auto/tests/unit/infer_request_schedule_policy_test.cpp b/src/plugins/auto/tests/unit/infer_request_schedule_policy_test.cpp
index f8946664579..3f080c24428 100644
--- a/src/plugins/auto/tests/unit/infer_request_schedule_policy_test.cpp
+++ b/src/plugins/auto/tests/unit/infer_request_schedule_policy_test.cpp
@@ -26,11 +26,7 @@ protected:
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- std::vector<ov::auto_plugin::DeviceInformation> devicesInfo;
- ov::intel_auto::SchedulePolicy schedulePolicy;
- std::map<std::string, int> numOfInferRequests;
- std::vector<std::string> expectedScheDevs;
- std::tie(devicesInfo, schedulePolicy, numOfInferRequests, expectedScheDevs) = obj.param;
+ const auto& [devicesInfo, schedulePolicy, numOfInferRequests, expectedScheDevs] = obj.param;
std::ostringstream result;
std::string candidateDevList;
result << "candaidateDeviceList_";
diff --git a/src/plugins/auto/tests/unit/key_network_priority_test.cpp b/src/plugins/auto/tests/unit/key_network_priority_test.cpp
index bd66dabb1de..4945bdef65c 100644
--- a/src/plugins/auto/tests/unit/key_network_priority_test.cpp
+++ b/src/plugins/auto/tests/unit/key_network_priority_test.cpp
@@ -19,10 +19,7 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- std::string netPrecision;
- bool enableDevicePriority;
- std::vector<PriorityParams> PriorityConfigs;
- std::tie(netPrecision, enableDevicePriority, PriorityConfigs) = obj.param;
+ const auto& [netPrecision, enableDevicePriority, PriorityConfigs] = obj.param;
std::ostringstream result;
if (enableDevicePriority) {
result << "_enableDevicePriority_true";
diff --git a/src/plugins/auto/tests/unit/log_utils_test.cpp b/src/plugins/auto/tests/unit/log_utils_test.cpp
index 26d9edc7a33..bac5ce597e8 100644
--- a/src/plugins/auto/tests/unit/log_utils_test.cpp
+++ b/src/plugins/auto/tests/unit/log_utils_test.cpp
@@ -35,10 +35,7 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- std::string logLevel;
- std::string envLogLevel;
- int expectCallNum;
- std::tie(logLevel, envLogLevel, expectCallNum) = obj.param;
+ const auto& [logLevel, envLogLevel, expectCallNum] = obj.param;
std::ostringstream result;
result << "logLevel_" << logLevel << "_expectCallNum_" << expectCallNum << "envlogLevel" << envLogLevel;
return result.str();
diff --git a/src/plugins/auto/tests/unit/meta_device_check_test.cpp b/src/plugins/auto/tests/unit/meta_device_check_test.cpp
index 36f5f57dd31..fb84108743f 100644
--- a/src/plugins/auto/tests/unit/meta_device_check_test.cpp
+++ b/src/plugins/auto/tests/unit/meta_device_check_test.cpp
@@ -11,9 +11,7 @@ using ConfigParams = std::tuple<std::string, // Priority devices
class IsMetaDeviceInCandidateListTest : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- std::string priorityDevices;
- bool expectedRet;
- std::tie(priorityDevices, expectedRet) = obj.param;
+ const auto& [priorityDevices, expectedRet] = obj.param;
std::ostringstream result;
result << "priorityDevices_" << priorityDevices;
if (expectedRet) {
diff --git a/src/plugins/auto/tests/unit/parse_meta_device_test.cpp b/src/plugins/auto/tests/unit/parse_meta_device_test.cpp
index fcd2b16e841..6de588d5084 100644
--- a/src/plugins/auto/tests/unit/parse_meta_device_test.cpp
+++ b/src/plugins/auto/tests/unit/parse_meta_device_test.cpp
@@ -19,11 +19,7 @@ using ConfigParams = std::tuple<std::string, // Priority dev
class ParseMetaDeviceTest : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- std::string priorityDevices;
- std::vector<DeviceInformation> metaDevices;
- bool throwException;
- int expectedTimes;
- std::tie(priorityDevices, metaDevices, throwException, expectedTimes) = obj.param;
+ const auto& [priorityDevices, metaDevices, throwException, expectedTimes] = obj.param;
std::ostringstream result;
result << "priorityDevices_" << priorityDevices;
if (throwException) {
diff --git a/src/plugins/auto/tests/unit/release_helper_test.cpp b/src/plugins/auto/tests/unit/release_helper_test.cpp
index 507127f036e..7bbeb167e41 100644
--- a/src/plugins/auto/tests/unit/release_helper_test.cpp
+++ b/src/plugins/auto/tests/unit/release_helper_test.cpp
@@ -16,9 +16,7 @@ using ConfigParams = std::tuple<bool, // cpu load success
class AutoReleaseHelperTest : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- bool cpuSuccess;
- bool accSuccess;
- std::tie(cpuSuccess, accSuccess) = obj.param;
+ const auto& [cpuSuccess, accSuccess] = obj.param;
std::ostringstream result;
if (!cpuSuccess) {
result << "cpuLoadFailure_";
@@ -41,9 +39,7 @@ class AutoCompiledModelGetPropertyWithReleaseHelper : public tests::AutoTest,
public ::testing::TestWithParam<PropertyConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<PropertyConfigParams> obj) {
- bool cpuSleep;
- bool actSleep;
- std::tie(cpuSleep, actSleep) = obj.param;
+ const auto& [cpuSleep, actSleep] = obj.param;
std::ostringstream result;
if (cpuSleep) {
result << "cpuHelper_sleep_Yes_";
@@ -63,9 +59,8 @@ public:
TEST_P(AutoCompiledModelGetPropertyWithReleaseHelper, getPropertyTestAfterReleaseResourceNoThrow) {
// get Parameter
- bool cpuSleep;
- bool actSleep;
- std::tie(cpuSleep, actSleep) = this->GetParam();
+
+ const auto& [cpuSleep, actSleep] = this->GetParam();
// test auto plugin
plugin->set_device_name("AUTO");
const std::string strDevices = ov::test::utils::DEVICE_GPU + std::string(",") + ov::test::utils::DEVICE_CPU;
@@ -154,9 +149,8 @@ TEST_P(AutoCompiledModelGetPropertyWithReleaseHelper, getPropertyTestAfterReleas
TEST_P(AutoReleaseHelperTest, releaseResource) {
// get Parameter
- bool cpuSuccess;
- bool accSuccess;
- std::tie(cpuSuccess, accSuccess) = this->GetParam();
+
+ const auto& [cpuSuccess, accSuccess] = this->GetParam();
size_t decreaseExeNetworkCount = 0;
size_t decreaseInferReqCount = 0;
// test auto plugin
diff --git a/src/plugins/auto/tests/unit/runtime_fallback_test.cpp b/src/plugins/auto/tests/unit/runtime_fallback_test.cpp
index 113b933c894..012d7cf6152 100644
--- a/src/plugins/auto/tests/unit/runtime_fallback_test.cpp
+++ b/src/plugins/auto/tests/unit/runtime_fallback_test.cpp
@@ -35,24 +35,16 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- std::vector<std::tuple<std::string, bool>> targetDevices;
- int loadNetworkNum;
- bool enableRumtimeFallback;
- bool expectThrow;
- bool loadNetworkFail;
- bool generateWorkersFail;
- std::tie(targetDevices,
- loadNetworkNum,
- enableRumtimeFallback,
- expectThrow,
- loadNetworkFail,
- generateWorkersFail) = obj.param;
+ const auto& [targetDevices,
+ loadNetworkNum,
+ enableRumtimeFallback,
+ expectThrow,
+ loadNetworkFail,
+ generateWorkersFail] = obj.param;
std::ostringstream result;
result << "auto_runtime_fallback_";
for (auto deviceInfo : targetDevices) {
- std::string deviceName;
- bool ifThrow;
- std::tie(deviceName, ifThrow) = deviceInfo;
+ const auto& [deviceName, ifThrow] = deviceInfo;
result << deviceName << "_";
if (ifThrow)
result << "true_";
@@ -149,14 +141,13 @@ using AutoCTPUTRuntimeFallback = AutoRuntimeFallback;
TEST_P(AutoRuntimeFallback, releaseResource) {
std::string targetDev;
- std::vector<std::tuple<std::string, bool>> targetDevices;
- int loadNetworkNum;
- bool enableRumtimeFallback;
- bool expectThrow;
- bool loadNetworkFail;
- bool generateWorkersFail;
- std::tie(targetDevices, loadNetworkNum, enableRumtimeFallback, expectThrow, loadNetworkFail, generateWorkersFail) =
- this->GetParam();
+
+ const auto& [targetDevices,
+ loadNetworkNum,
+ enableRumtimeFallback,
+ expectThrow,
+ loadNetworkFail,
+ generateWorkersFail] = this->GetParam();
if (loadNetworkFail) {
ON_CALL(*core,
compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
@@ -170,9 +161,8 @@ TEST_P(AutoRuntimeFallback, releaseResource) {
inferRequests["GPU.1"] = {};
inferRequests["OTHER"] = {};
for (auto& deviceInfo : targetDevices) {
- std::string deviceName;
- bool ifThrow;
- std::tie(deviceName, ifThrow) = deviceInfo;
+ const auto& [_deviceName, ifThrow] = deviceInfo;
+ const auto& deviceName = _deviceName;
targetDev += deviceName;
targetDev += ((deviceInfo == targetDevices.back()) ? "" : ",");
if (deviceName == "CPU") {
@@ -361,14 +351,14 @@ INSTANTIATE_TEST_SUITE_P(smoke_AutoRuntimeFallback,
TEST_P(AutoCTPUTRuntimeFallback, ctputDeviceInferFailTest) {
std::string targetDev;
- std::vector<std::tuple<std::string, bool>> targetDevices; // std::tuple<deviceName, will infer throw exception>
- int loadNetworkNum;
- bool enableRumtimeFallback;
- bool expectThrow;
- bool loadNetworkFail;
- bool generateWorkersFail;
- std::tie(targetDevices, loadNetworkNum, enableRumtimeFallback, expectThrow, loadNetworkFail, generateWorkersFail) =
- this->GetParam();
+ // std::tuple<deviceName, will infer throw exception>
+
+ const auto& [targetDevices,
+ loadNetworkNum,
+ enableRumtimeFallback,
+ expectThrow,
+ loadNetworkFail,
+ generateWorkersFail] = this->GetParam();
if (loadNetworkFail) {
ON_CALL(*core,
compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
@@ -382,9 +372,8 @@ TEST_P(AutoCTPUTRuntimeFallback, ctputDeviceInferFailTest) {
inferRequests["GPU.1"] = {};
inferRequests["OTHER"] = {};
for (auto& deviceInfo : targetDevices) {
- std::string deviceName;
- bool ifThrow;
- std::tie(deviceName, ifThrow) = deviceInfo;
+ const auto& [_deviceName, ifThrow] = deviceInfo;
+ const auto& deviceName = _deviceName;
targetDev += deviceName;
targetDev += ((deviceInfo == targetDevices.back()) ? "" : ",");
if (deviceName == "CPU") {
diff --git a/src/plugins/auto/tests/unit/select_device_failed_test.cpp b/src/plugins/auto/tests/unit/select_device_failed_test.cpp
index 2eeff63c337..7b076549fba 100644
--- a/src/plugins/auto/tests/unit/select_device_failed_test.cpp
+++ b/src/plugins/auto/tests/unit/select_device_failed_test.cpp
@@ -27,15 +27,13 @@ using ConfigParams = std::tuple<bool, // if can continue t
class AutoLoadFailedTest : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- unsigned int selectCount;
- unsigned int loadCount;
- unsigned int loadSuccessCount;
- std::vector<std::tuple<std::string, bool>> deviceConfigs;
- bool continueRun;
- bool thrExcWheSelect;
- MODEL configModel;
- std::tie(continueRun, thrExcWheSelect, configModel, deviceConfigs, selectCount, loadCount, loadSuccessCount) =
- obj.param;
+ const auto& [continueRun,
+ thrExcWheSelect,
+ configModel,
+ deviceConfigs,
+ selectCount,
+ loadCount,
+ loadSuccessCount] = obj.param;
std::ostringstream result;
for (auto& item : deviceConfigs) {
if (std::get<1>(item)) {
@@ -77,14 +75,8 @@ public:
TEST_P(AutoLoadFailedTest, LoadCNNetWork) {
// get Parameter
- unsigned int selectCount;
- unsigned int loadCount;
- unsigned int loadSuccessCount;
- std::vector<std::tuple<std::string, bool>> deviceConfigs;
- bool continueRun;
- bool thrExcWheSelect;
- MODEL configModel;
- std::tie(continueRun, thrExcWheSelect, configModel, deviceConfigs, selectCount, loadCount, loadSuccessCount) =
+
+ const auto& [continueRun, thrExcWheSelect, configModel, deviceConfigs, selectCount, loadCount, loadSuccessCount] =
this->GetParam();
// test auto plugin
diff --git a/src/plugins/auto/tests/unit/select_device_test.cpp b/src/plugins/auto/tests/unit/select_device_test.cpp
index b5964276a60..80d8e5eece2 100644
--- a/src/plugins/auto/tests/unit/select_device_test.cpp
+++ b/src/plugins/auto/tests/unit/select_device_test.cpp
@@ -33,13 +33,7 @@ std::vector<ConfigParams> testConfigs;
class SelectDeviceTest : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- std::string netPrecision;
- std::vector<DeviceInformation> devices;
- DeviceInformation expect;
- bool throwExcept;
- bool enabledevice_priority;
- bool reverse;
- std::tie(netPrecision, devices, expect, throwExcept, enabledevice_priority, reverse) = obj.param;
+ const auto& [netPrecision, devices, expect, throwExcept, enabledevice_priority, reverse] = obj.param;
std::ostringstream result;
result << "_netPrecision_" << netPrecision;
for (auto& item : devices) {
@@ -195,7 +189,7 @@ public:
return testConfigs;
}
- void compare(DeviceInformation& a, DeviceInformation& b) {
+ void compare(const DeviceInformation& a, const DeviceInformation& b) {
EXPECT_EQ(a.device_name, b.device_name);
EXPECT_EQ(a.unique_name, b.unique_name);
EXPECT_EQ(a.default_device_id, b.default_device_id);
@@ -216,14 +210,7 @@ public:
};
TEST_P(SelectDeviceTest, SelectDevice) {
- // get Parameter
- std::string netPrecision;
- std::vector<DeviceInformation> devices;
- DeviceInformation expect;
- bool throwExcept;
- bool enabledevice_priority;
- bool reverse;
- std::tie(netPrecision, devices, expect, throwExcept, enabledevice_priority, reverse) = this->GetParam();
+ const auto& [netPrecision, devices, expect, throwExcept, enabledevice_priority, reverse] = this->GetParam();
EXPECT_CALL(*plugin, select_device(_, _, _)).Times(1);
if (devices.size() >= 1) {
@@ -243,4 +230,4 @@ TEST_P(SelectDeviceTest, SelectDevice) {
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests,
SelectDeviceTest,
::testing::ValuesIn(SelectDeviceTest::CreateConfigs()),
- SelectDeviceTest::getTestCaseName);
\ No newline at end of file
+ SelectDeviceTest::getTestCaseName);
diff --git a/src/plugins/auto/tests/unit/set_log_level_test.cpp b/src/plugins/auto/tests/unit/set_log_level_test.cpp
index 0f6f72c56e8..9154f27bbd5 100644
--- a/src/plugins/auto/tests/unit/set_log_level_test.cpp
+++ b/src/plugins/auto/tests/unit/set_log_level_test.cpp
@@ -19,9 +19,7 @@ using namespace ov::mock_auto_plugin;
class AutoSetLogLevel : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseName(testing::TestParamInfo<ConfigParams> obj) {
- std::string log_level;
- ov::AnyMap config;
- std::tie(log_level, config) = obj.param;
+ const auto& [log_level, config] = obj.param;
std::ostringstream result;
result << log_level;
return result.str();
@@ -52,9 +50,8 @@ public:
TEST_P(AutoSetLogLevel, setLogLevelFromConfig) {
custom_unsetenv("OPENVINO_LOG_LEVEL");
- std::string log_level;
- ov::AnyMap config;
- std::tie(log_level, config) = this->GetParam();
+
+ const auto& [log_level, config] = this->GetParam();
plugin->set_device_name("AUTO");
plugin->compile_model(model, config);
int a = 0;
diff --git a/src/plugins/auto/tests/unit/startup_fallback_property_test.cpp b/src/plugins/auto/tests/unit/startup_fallback_property_test.cpp
index b5ee8c5483c..ef15f01f166 100644
--- a/src/plugins/auto/tests/unit/startup_fallback_property_test.cpp
+++ b/src/plugins/auto/tests/unit/startup_fallback_property_test.cpp
@@ -30,9 +30,7 @@ MATCHER_P(MapContains, subMap, "Check if all the elements of the subMap are cont
class AutoStartupFallback : public tests::AutoTest, public ::testing::TestWithParam<ConfigParams> {
public:
static std::string getTestCaseNameCacheTest(testing::TestParamInfo<ConfigParams> obj) {
- bool startup_fallback;
- ov::AnyMap config;
- std::tie(startup_fallback, config) = obj.param;
+ const auto& [startup_fallback, config] = obj.param;
std::ostringstream result;
result << "_expected_disabling_cache_" << startup_fallback;
result << "_compiled_config_";
@@ -64,9 +62,8 @@ public:
TEST_P(AutoStartupFallback, propertytest) {
// get Parameter
- bool startup_fallback;
- ov::AnyMap config;
- std::tie(startup_fallback, config) = this->GetParam();
+
+ const auto& [startup_fallback, config] = this->GetParam();
EXPECT_CALL(*core,
compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
@@ -93,9 +90,8 @@ INSTANTIATE_TEST_SUITE_P(smoke_Auto_StartupFallback, AutoStartupFallback, ::test
using AutoLoadExeNetworkCacheDirSettingTest = AutoStartupFallback;
TEST_P(AutoLoadExeNetworkCacheDirSettingTest, canDisableCacheDirSettingForCPUPlugin) {
// get Parameter
- bool is_disable_cache_dir;
- ov::AnyMap config;
- std::tie(is_disable_cache_dir, config) = this->GetParam();
+
+ const auto& [is_disable_cache_dir, config] = this->GetParam();
EXPECT_CALL(*core,
compile_model(::testing::Matcher<const std::shared_ptr<const ov::Model>&>(_),
::testing::Matcher<const std::string&>(StrEq(ov::test::utils::DEVICE_GPU)),
diff --git a/src/plugins/auto/tests/unit/stateful_model_test.cpp b/src/plugins/auto/tests/unit/stateful_model_test.cpp
index e2b72f57644..55bb7a7b904 100644
--- a/src/plugins/auto/tests/unit/stateful_model_test.cpp
+++ b/src/plugins/auto/tests/unit/stateful_model_test.cpp
@@ -37,20 +37,13 @@ protected:
};
std::string StatefulModelSupportedTest::getTestCaseName(testing::TestParamInfo<StatefulModelConfigParams> obj) {
- bool isDynamicModel;
- bool isStatefulModel;
- bool isActualSuccessful;
- bool isCumulative;
- std::vector<std::pair<std::string, int>> expectedCalledTimes;
- std::string devicesList;
- std::string expectedExecuteDev;
- std::tie(devicesList,
- isDynamicModel,
- isStatefulModel,
- isCumulative,
- isActualSuccessful,
- expectedCalledTimes,
- expectedExecuteDev) = obj.param;
+ const auto& [devicesList,
+ isDynamicModel,
+ isStatefulModel,
+ isCumulative,
+ isActualSuccessful,
+ expectedCalledTimes,
+ expectedExecuteDev] = obj.param;
std::ostringstream result;
result << "_devicesList_" << devicesList;
result << "_isDynamic_" << isDynamicModel;
diff --git a/src/plugins/auto_batch/tests/unit/async_infer_request_test.cpp b/src/plugins/auto_batch/tests/unit/async_infer_request_test.cpp
index 4b76b12c69f..57bbd4a19c2 100644
--- a/src/plugins/auto_batch/tests/unit/async_infer_request_test.cpp
+++ b/src/plugins/auto_batch/tests/unit/async_infer_request_test.cpp
@@ -62,9 +62,7 @@ public:
bool m_terminate;
static std::string getTestCaseName(testing::TestParamInfo<AutoBatchRequestTestParams> obj) {
- uint32_t batch_size, infer_interval;
- ov::element::Type_t element_type;
- std::tie(batch_size, element_type, infer_interval) = obj.param;
+ const auto& [batch_size, element_type, infer_interval] = obj.param;
std::string res;
res = "batch_size_" + std::to_string(batch_size);
diff --git a/src/plugins/auto_batch/tests/unit/compile_model_create_infer_request_test.cpp b/src/plugins/auto_batch/tests/unit/compile_model_create_infer_request_test.cpp
index 5c97bf27020..a56a157a70d 100644
--- a/src/plugins/auto_batch/tests/unit/compile_model_create_infer_request_test.cpp
+++ b/src/plugins/auto_batch/tests/unit/compile_model_create_infer_request_test.cpp
@@ -39,9 +39,7 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<CreateInferRequestTestParams> obj) {
- int batch_size;
- int infer_num;
- std::tie(batch_size, infer_num) = obj.param;
+ const auto& [batch_size, infer_num] = obj.param;
std::string res;
res = "batch_size_" + std::to_string(batch_size);
diff --git a/src/plugins/auto_batch/tests/unit/compile_model_get_property_test.cpp b/src/plugins/auto_batch/tests/unit/compile_model_get_property_test.cpp
index 874cda42658..2b65697e188 100644
--- a/src/plugins/auto_batch/tests/unit/compile_model_get_property_test.cpp
+++ b/src/plugins/auto_batch/tests/unit/compile_model_get_property_test.cpp
@@ -25,9 +25,7 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<get_property_param> obj) {
- std::string properity_name;
- bool throw_exception;
- std::tie(properity_name, throw_exception) = obj.param;
+ const auto& [properity_name, throw_exception] = obj.param;
std::string res;
res += "_" + properity_name;
diff --git a/src/plugins/auto_batch/tests/unit/compile_model_set_property_test.cpp b/src/plugins/auto_batch/tests/unit/compile_model_set_property_test.cpp
index 0a9d11ac083..5078c28f2e7 100644
--- a/src/plugins/auto_batch/tests/unit/compile_model_set_property_test.cpp
+++ b/src/plugins/auto_batch/tests/unit/compile_model_set_property_test.cpp
@@ -26,9 +26,7 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<set_property_param> obj) {
- ov::AnyMap properities;
- bool throw_exception;
- std::tie(properities, throw_exception) = obj.param;
+ const auto& [properities, throw_exception] = obj.param;
std::string res;
for (auto& c : properities) {
diff --git a/src/plugins/auto_batch/tests/unit/parse_batch_device_test.cpp b/src/plugins/auto_batch/tests/unit/parse_batch_device_test.cpp
index 095e0d5f83c..77e43a45d77 100644
--- a/src/plugins/auto_batch/tests/unit/parse_batch_device_test.cpp
+++ b/src/plugins/auto_batch/tests/unit/parse_batch_device_test.cpp
@@ -20,11 +20,7 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<batch_device_config_params> obj) {
- std::string batch_device_config;
- std::string device_name;
- int batch_size;
- bool throw_exception;
- std::tie(batch_device_config, device_name, batch_size, throw_exception) = obj.param;
+ const auto& [batch_device_config, device_name, batch_size, throw_exception] = obj.param;
std::string res = batch_device_config;
if (throw_exception)
res += "_throw";
diff --git a/src/plugins/auto_batch/tests/unit/parse_meta_device_test.cpp b/src/plugins/auto_batch/tests/unit/parse_meta_device_test.cpp
index 363f3d2c2c2..25372aca97c 100644
--- a/src/plugins/auto_batch/tests/unit/parse_meta_device_test.cpp
+++ b/src/plugins/auto_batch/tests/unit/parse_meta_device_test.cpp
@@ -31,12 +31,7 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<meta_device_params> obj) {
- std::string batch_cfg;
- ov::AnyMap config;
- DeviceInformation info;
- bool throw_exception;
-
- std::tie(batch_cfg, config, info, throw_exception) = obj.param;
+ const auto& [batch_cfg, config, info, throw_exception] = obj.param;
std::string res = batch_cfg;
for (auto& c : config) {
res += "_" + c.first + "_" + c.second.as<std::string>();
diff --git a/src/plugins/auto_batch/tests/unit/plugin_compile_model_test.cpp b/src/plugins/auto_batch/tests/unit/plugin_compile_model_test.cpp
index bb047b382a2..2071e1c41a5 100644
--- a/src/plugins/auto_batch/tests/unit/plugin_compile_model_test.cpp
+++ b/src/plugins/auto_batch/tests/unit/plugin_compile_model_test.cpp
@@ -30,10 +30,7 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<plugin_compile_model_param> obj) {
- ov::AnyMap core_properities;
- ov::AnyMap plugin_properities;
- uint32_t expect_batch_size;
- std::tie(core_properities, plugin_properities, expect_batch_size) = obj.param;
+ const auto& [core_properities, plugin_properities, expect_batch_size] = obj.param;
std::string res;
for (auto& c : core_properities) {
diff --git a/src/plugins/auto_batch/tests/unit/plugin_get_property_test.cpp b/src/plugins/auto_batch/tests/unit/plugin_get_property_test.cpp
index 0a7656f0d17..19c0cea025d 100644
--- a/src/plugins/auto_batch/tests/unit/plugin_get_property_test.cpp
+++ b/src/plugins/auto_batch/tests/unit/plugin_get_property_test.cpp
@@ -15,10 +15,7 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<get_property_params> obj) {
- std::string property_name;
- bool throw_exception;
-
- std::tie(property_name, throw_exception) = obj.param;
+ const auto& [property_name, throw_exception] = obj.param;
std::string res = "";
if (!property_name.empty()) {
diff --git a/src/plugins/auto_batch/tests/unit/plugin_query_model_test.cpp b/src/plugins/auto_batch/tests/unit/plugin_query_model_test.cpp
index 1d8f6dbc8bd..89790a34070 100644
--- a/src/plugins/auto_batch/tests/unit/plugin_query_model_test.cpp
+++ b/src/plugins/auto_batch/tests/unit/plugin_query_model_test.cpp
@@ -20,10 +20,7 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<query_model_params> obj) {
- ov::AnyMap properties;
- bool throw_exception;
-
- std::tie(properties, throw_exception) = obj.param;
+ const auto& [properties, throw_exception] = obj.param;
std::string res = "";
if (properties.size() > 0) {
res += "QueryModel_";
diff --git a/src/plugins/auto_batch/tests/unit/plugin_set_property_test.cpp b/src/plugins/auto_batch/tests/unit/plugin_set_property_test.cpp
index bfe54f6699f..e0cfe08194c 100644
--- a/src/plugins/auto_batch/tests/unit/plugin_set_property_test.cpp
+++ b/src/plugins/auto_batch/tests/unit/plugin_set_property_test.cpp
@@ -15,10 +15,7 @@ public:
public:
static std::string getTestCaseName(testing::TestParamInfo<set_property_params> obj) {
- ov::AnyMap properties;
- bool throw_exception;
-
- std::tie(properties, throw_exception) = obj.param;
+ const auto& [properties, throw_exception] = obj.param;
std::string res = "";
if (properties.size() > 0) {
res += "SetProperty_";
diff --git a/src/plugins/auto_batch/tests/unit/sync_infer_request_test.cpp b/src/plugins/auto_batch/tests/unit/sync_infer_request_test.cpp
index 01676131353..040d6bec46b 100644
--- a/src/plugins/auto_batch/tests/unit/sync_infer_request_test.cpp
+++ b/src/plugins/auto_batch/tests/unit/sync_infer_request_test.cpp
@@ -51,9 +51,7 @@ public:
std::vector<ov::ProfilingInfo> m_profiling_info;
static std::string getTestCaseName(testing::TestParamInfo<AutoBatchRequestTestParams> obj) {
- uint32_t batch_size;
- ov::element::Type_t element_type;
- std::tie(batch_size, element_type) = obj.param;
+ const auto& [batch_size, element_type] = obj.param;
std::string res;
res = "batch_size_" + std::to_string(batch_size);
diff --git a/src/plugins/hetero/tests/functional/shared_tests_instances/behavior/ov_infer_request/gpu_dyn_batch_shape_tests.cpp b/src/plugins/hetero/tests/functional/shared_tests_instances/behavior/ov_infer_request/gpu_dyn_batch_shape_tests.cpp
index 3ca2aa64c2d..5daaf149ba0 100644
--- a/src/plugins/hetero/tests/functional/shared_tests_instances/behavior/ov_infer_request/gpu_dyn_batch_shape_tests.cpp
+++ b/src/plugins/hetero/tests/functional/shared_tests_instances/behavior/ov_infer_request/gpu_dyn_batch_shape_tests.cpp
@@ -22,11 +22,7 @@ class OVDynamicBatchShape_Tests : public ::testing::WithParamInterface<OVDynamic
virtual public ov::test::SubgraphBaseTest {
public:
static std::string getTestCaseName(::testing::TestParamInfo<OVDynamicBatchParams> obj) {
- std::vector<InputShape> input_shapes;
- ov::element::Type model_type;
- std::string target_device;
- ov::AnyMap configuration;
- std::tie(input_shapes, model_type, target_device, configuration) = obj.param;
+ const auto& [input_shapes, model_type, target_device, configuration] = obj.param;
std::ostringstream result;
result << "IS=";
@@ -61,9 +57,11 @@ protected:
core.reset();
core = ov::test::utils::PluginCache::get().core();
}
- std::vector<InputShape> input_shape;
- std::tie(input_shape, model_type, targetDevice, configuration) = this->GetParam();
+ const auto& [input_shape, _model_type, _targetDevice, _configuration] = this->GetParam();
+ model_type = _model_type;
+ targetDevice = _targetDevice;
+ configuration = _configuration;
init_input_shapes(input_shape);
// TODO: think how we can switch between several input topologies in the future
diff --git a/src/plugins/hetero/tests/unit/subgraph_collector.cpp b/src/plugins/hetero/tests/unit/subgraph_collector.cpp
index a158e18a86b..767b31dc1a9 100644
--- a/src/plugins/hetero/tests/unit/subgraph_collector.cpp
+++ b/src/plugins/hetero/tests/unit/subgraph_collector.cpp
@@ -164,9 +164,8 @@ TEST_F(SubgraphCollectorTest, submodel_split_and_merge) {
SubgraphCollector subgraph_collector(m_model, affinities);
auto actual_subgraphs_ids = subgraph_collector.get_subgraph_ids();
ASSERT_EQ(exptected_subgraphs_ids, actual_subgraphs_ids);
- ov::hetero::SubgraphsVector actual_subgraphs;
- ov::hetero::SubgraphsMappingInfo actual_mapping_info;
- std::tie(actual_subgraphs, actual_mapping_info) = subgraph_collector.run();
+
+ const auto& [actual_subgraphs, actual_mapping_info] = subgraph_collector.run();
ASSERT_EQ(3, actual_subgraphs.size());
std::vector<std::shared_ptr<ov::Model>> actual_submodels;
@@ -338,9 +337,8 @@ TEST_F(SubgraphCollectorTest2, submodel_split_and_merge) {
}
// Collect subgraphs
SubgraphCollector subgraph_collector(m_model, affinities);
- ov::hetero::SubgraphsVector actual_subgraphs;
- ov::hetero::SubgraphsMappingInfo actual_mapping_info;
- std::tie(actual_subgraphs, actual_mapping_info) = subgraph_collector.run();
+
+ const auto& [actual_subgraphs, actual_mapping_info] = subgraph_collector.run();
ASSERT_EQ(3, actual_subgraphs.size());
std::vector<std::shared_ptr<ov::Model>> actual_submodels;
@@ -546,9 +544,8 @@ TEST_F(SubgraphCollectorTest, submodel_with_constant_subgraphs) {
};
auto supported_ops = supported_ops_with_affinity;
- ov::hetero::SubgraphsVector ordered_subgraphs;
- ov::hetero::SubgraphsMappingInfo actual_mapping_info;
- std::tie(ordered_subgraphs, actual_mapping_info) = get_model_subgraphs(model, supported_ops, true, false);
+
+ const auto& [ordered_subgraphs, actual_mapping_info] = get_model_subgraphs(model, supported_ops, true, false);
for (const auto& subgraph : ordered_subgraphs) {
std::set<std::string> node_set;
auto sub_model = std::make_shared<ov::Model>(subgraph._results, subgraph._sinks, subgraph._parameters);
@@ -600,9 +597,8 @@ TEST_F(SubgraphCollectorTest, merge_independent_submodel) {
}
// Collect subgraphs
SubgraphCollector subgraph_collector(model, affinities);
- ov::hetero::SubgraphsVector actual_subgraphs;
- ov::hetero::SubgraphsMappingInfo actual_mapping_info;
- std::tie(actual_subgraphs, actual_mapping_info) = subgraph_collector.run();
+
+ const auto& [actual_subgraphs, actual_mapping_info] = subgraph_collector.run();
ASSERT_EQ(3, actual_subgraphs.size());
std::vector<std::shared_ptr<ov::Model>> actual_submodels;