Fix SonarQube issues

This commit is contained in:
Uwe Seimet 2023-10-02 12:20:35 +02:00
parent 2453d8e79f
commit f4a7137898
5 changed files with 5 additions and 5 deletions

View File

@ -96,7 +96,7 @@ TEST(DeviceFactoryTest, GetDefaultParams)
{
DeviceFactory device_factory;
unordered_map<string, string> params = device_factory.GetDefaultParams(SCHD);
param_map params = device_factory.GetDefaultParams(SCHD);
EXPECT_TRUE(params.empty());
params = device_factory.GetDefaultParams(SCRM);

View File

@ -195,7 +195,7 @@ TEST(DeviceTest, GetPaddedName)
TEST(DeviceTest, Params)
{
MockDevice device(0);
unordered_map<string, string> params;
param_map params;
params["key"] = "value";
EXPECT_EQ("", device.GetParam("key"));

View File

@ -34,7 +34,7 @@ void TestNonDiskDevice(PbDeviceType type, int default_param_count)
PiscsiResponse response;
auto d = device_factory.CreateDevice(type, 0, "");
const unordered_map<string, string> params;
const param_map params;
d->Init(params);
EXPECT_TRUE(controller_manager.AttachToController(*bus, 0, d));

View File

@ -350,7 +350,7 @@ TEST(PrimaryDeviceTest, GetSetSendDelay)
TEST(PrimaryDeviceTest, Init)
{
unordered_map<string, string> params;
param_map params;
MockPrimaryDevice device(0);
EXPECT_TRUE(device.Init(params)) << "Initialization of primary device must not fail";

View File

@ -18,7 +18,7 @@ TEST(ScsiPrinterTest, Init)
auto [controller, printer] = CreateDevice(SCLP);
EXPECT_TRUE(printer->Init({}));
unordered_map<string, string> params;
param_map params;
params["cmd"] = "missing_filename_specifier";
EXPECT_FALSE(printer->Init(params));