add control xfer for ehci controller fake: ehci_controller_control_xfer_proceed

refractor test code
This commit is contained in:
hathach
2013-04-05 14:00:37 +07:00
parent fcb8e295ec
commit 68dddefe7b
8 changed files with 182 additions and 14 deletions
+3 -9
View File
@@ -69,32 +69,26 @@ void tearDown(void)
void test_isr_device_connect_highspeed(void)
{
ehci_controller_device_plug(hostid, TUSB_SPEED_HIGH);
usbh_device_plugged_isr_Expect(hostid, TUSB_SPEED_HIGH);
//------------- Code Under Test -------------//
hcd_isr(hostid);
ehci_controller_device_plug(hostid, TUSB_SPEED_HIGH);
}
void test_isr_device_connect_fullspeed(void)
{
ehci_controller_device_plug(hostid, TUSB_SPEED_FULL);
usbh_device_plugged_isr_Expect(hostid, TUSB_SPEED_FULL);
//------------- Code Under Test -------------//
hcd_isr(hostid);
ehci_controller_device_plug(hostid, TUSB_SPEED_FULL);
}
void test_isr_device_connect_slowspeed(void)
{
ehci_controller_device_plug(hostid, TUSB_SPEED_LOW);
usbh_device_plugged_isr_Expect(hostid, TUSB_SPEED_LOW);
//------------- Code Under Test -------------//
hcd_isr(hostid);
ehci_controller_device_plug(hostid, TUSB_SPEED_LOW);
}
void test_isr_device_disconnect(void)