MCPcopy Create free account
hub / github.com/PiSCSI/piscsi / CreatePrimaryDevice

Function CreatePrimaryDevice

cpp/test/primary_device_test.cpp:20–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18using namespace scsi_command_util;
19
20pair<shared_ptr<MockAbstractController>, shared_ptr<MockPrimaryDevice>> CreatePrimaryDevice(int id = 0)
21{
22 auto controller = make_shared<NiceMock<MockAbstractController>>(id);
23 auto device = make_shared<MockPrimaryDevice>(0);
24 EXPECT_TRUE(device->Init({}));
25 EXPECT_TRUE(controller->AddDevice(device));
26
27 return { controller, device };
28}
29
30TEST(PrimaryDeviceTest, GetId)
31{

Callers 1

TESTFunction · 0.85

Calls 2

AddDeviceMethod · 0.80
InitMethod · 0.45

Tested by

no test coverage detected