mirror of
https://github.com/akuker/RASCSI.git
synced 2025-07-23 07:24:13 +00:00
- Memory management updates, more fixed Sonar issues * Replaced macros, fixed other sonar issues * Added const, replaced enum with a single value by constant * Updated object initializations * Fixed potential strncpy overflow reported by gcc 8.3
This commit is contained in:
@@ -15,7 +15,7 @@ TEST(ControllerManagerTest, ControllerManager)
|
||||
const int ID = 4;
|
||||
const int LUN = 6;
|
||||
|
||||
auto device = static_cast<PrimaryDevice *>(device_factory.CreateDevice(UNDEFINED, "services", ID));
|
||||
auto device = device_factory.CreateDevice(UNDEFINED, "services", ID);
|
||||
device->SetId(ID);
|
||||
device->SetLun(LUN);
|
||||
|
||||
@@ -27,7 +27,8 @@ TEST(ControllerManagerTest, ControllerManager)
|
||||
EXPECT_EQ(device, controller_manager.GetDeviceByIdAndLun(ID, LUN));
|
||||
EXPECT_EQ(nullptr, controller_manager.GetDeviceByIdAndLun(0, 0));
|
||||
|
||||
controller_manager.DeleteAllControllersAndDevices();
|
||||
controller_manager.DeleteAllControllers();
|
||||
device_factory.DeleteAllDevices();
|
||||
EXPECT_EQ(nullptr, controller_manager.FindController(ID));
|
||||
EXPECT_EQ(nullptr, controller_manager.GetDeviceByIdAndLun(ID, LUN));
|
||||
}
|
||||
|
Reference in New Issue
Block a user