diff options
| author | hathach <[email protected]> | 2013-03-25 17:57:33 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-03-25 17:57:33 +0700 |
| commit | 2622cc487bb4a35a0ded8512255d21a78807a4f5 (patch) | |
| tree | cabff712e8b01e2606b21313184d9db1bce3ab35 /tests | |
| parent | d0a73f4b0d6d25d5f6a08f3b519241cec4e2a535 (diff) | |
add more test and complete keyboard open
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test/host/hid/test_hidh_keyboard.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test/host/hid/test_hidh_keyboard.c b/tests/test/host/hid/test_hidh_keyboard.c index b437c9cab..12f3d7e4b 100644 --- a/tests/test/host/hid/test_hidh_keyboard.c +++ b/tests/test/host/hid/test_hidh_keyboard.c @@ -119,9 +119,11 @@ void test_keyboard_open_ok(void) TEST_ASSERT_EQUAL(TUSB_ERROR_NONE, hidh_keyboard_open_subtask(dev_addr, (uint8_t*) p_kbd_interface_desc, &length)); tusbh_device_get_state_IgnoreAndReturn(TUSB_DEVICE_STATE_CONFIGURED); - TEST_ASSERT_EQUAL(2, tusbh_hid_keyboard_no_instances(dev_addr)); // init instance to 1 + TEST_ASSERT_EQUAL(2, tusbh_hid_keyboard_no_instances(dev_addr)); // init set instance number to 1 TEST_ASSERT_PIPE_HANDLE(pipe_hdl, p_hidh_kbd_interface->pipe_in); TEST_ASSERT_EQUAL(8, p_hidh_kbd_interface->report_size); + TEST_ASSERT_EQUAL(sizeof(tusb_descriptor_interface_t) + sizeof(tusb_hid_descriptor_hid_t) + sizeof(tusb_descriptor_endpoint_t), + length); } void test_keyboard_init(void) |
