File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -83,15 +83,12 @@ TEST_F(PortsTest, ScanPortsWithFakeDevices) {
8383
8484 EXPECT_EQ (count, 2 ) << " Should find 2 fake devices" ;
8585
86- // Verify device details
87- std::vector<libserial::Device> devices;
88- ports.getDevices (devices);
89- ASSERT_EQ (devices.size (), 2 );
90-
91- EXPECT_EQ (devices[1 ].getName (), " usb-FTDI_FT232R_USB_UART_A1B2C3D4" );
92- EXPECT_EQ (devices[1 ].getPortPath (), " /dev/ttyUSB0" );
93- EXPECT_EQ (devices[0 ].getName (), " usb-Arduino_Uno_12345678" );
94- EXPECT_EQ (devices[0 ].getPortPath (), " /dev/ttyUSB1" );
86+ EXPECT_EQ (ports.findName (1 ).value (), " usb-FTDI_FT232R_USB_UART_A1B2C3D4" );
87+ EXPECT_EQ (ports.findName (0 ).value (), " usb-Arduino_Uno_12345678" );
88+ EXPECT_EQ (ports.findPortPath (1 ).value (), " /dev/ttyUSB0" );
89+ EXPECT_EQ (ports.findPortPath (0 ).value (), " /dev/ttyUSB1" );
90+ EXPECT_EQ (ports.findBusPath (1 ).value (), " /dev/ttyUSB0" );
91+ EXPECT_EQ (ports.findBusPath (0 ).value (), " /dev/ttyUSB1" );
9592}
9693
9794
You can’t perform that action at this time.
0 commit comments