src/connectivity/network/drivers/network-device/device/network_device-test.cc
// Test that returning tx buffers in the body of QueueTx is allowd and works.
Test that returning tx buffers in the body of QueueTx is allowd and works.
Test that returning tx buffers in the body of QueueTx is allowd and works .
TEST_F(NetworkDeviceTest, ReturnTxInline) {
  impl_.set_auto_return_tx(true);
  ASSERT_OK(CreateDevice());
  auto connection = OpenConnection();
  TestSession session;
  ASSERT_OK(OpenSession(&session));
  ASSERT_OK(session.SetPaused(false));
  ASSERT_OK(WaitStart());
  session.ResetDescriptor(0x02);
  ASSERT_OK(session.SendTx(0x02));
  ASSERT_OK(WaitTx());
  uint16_t desc;
  ASSERT_OK(session.FetchTx(&desc));
  EXPECT_EQ(desc, 0x02);
}
TEST_F ( NetworkDeviceTest , ReturnTxInline ) { impl_ . set_auto_return_tx ( true ) ; ASSERT_OK ( CreateDevice ( ) ) ; auto connection = OpenConnection ( ) ; TestSession session ; ASSERT_OK ( OpenSession ( & session ) ) ; ASSERT_OK ( session . SetPaused ( false ) ) ; ASSERT_OK ( WaitStart ( ) ) ; session . ResetDescriptor ( 0x02 ) ; ASSERT_OK ( session . SendTx ( 0x02 ) ) ; ASSERT_OK ( WaitTx ( ) ) ; uint16_t desc ; ASSERT_OK ( session . FetchTx ( & desc ) ) ; EXPECT_EQ ( desc , 0x02 ) ; }
Test that returning tx buffers in the body of QueueTx is allowd and works.
Test that returning tx buffers in the body of QueueTx is allowd and works .