extern int utc_usb_host_device_get_config_n(void);
extern int utc_usb_host_control_transfer_n(void);
extern int utc_usb_host_transfer_n(void);
+extern int utc_usb_host_set_hotplug_cb_n(void);
+extern int utc_usb_host_unset_hotplug_cb_n(void);
testcase tc_array[] = {
{"utc_usb_host_claim_interface_n", utc_usb_host_claim_interface_n, NULL, NULL},
{"utc_usb_host_set_config_n", utc_usb_host_set_config_n, NULL, NULL},
{"utc_usb_host_transfer_n", utc_usb_host_transfer_n, NULL, NULL},
{"utc_usb_host_unref_device_n", utc_usb_host_unref_device_n, NULL, NULL},
+ {"utc_usb_host_set_hotplug_cb_n", utc_usb_host_set_hotplug_cb_n, NULL, NULL},
+ {"utc_usb_host_unset_hotplug_cb_n", utc_usb_host_unset_hotplug_cb_n, NULL, NULL},
{NULL, NULL}
};
return 0;
}
+
+/**
+ * @testcase utc_usb_host_set_hotplug_cb_n
+ * @since_tizen 4.0
+ * @type negative
+ * @description Set hotplug callback
+ * @scenario Checks if passing NULL parameters results in INVALID_PARAMETER error
+ */
+int utc_usb_host_set_hotplug_cb_n(void)
+{
+ int ret;
+
+ ret = usb_host_set_hotplug_cb(NULL, NULL, USB_HOST_HOTPLUG_EVENT_ANY, NULL, NULL);
+ assert_eq_supp(ret, USB_HOST_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_usb_host_unset_hotplug_cb_n
+ * @since_tizen 4.0
+ * @type negative
+ * @description Unset hotplug callback
+ * @scenario Checks if passing NULL parameters results in INVALID_PARAMETER error
+ */
+int utc_usb_host_unset_hotplug_cb_n(void)
+{
+ int ret;
+
+ ret = usb_host_unset_hotplug_cb(NULL);
+ assert_eq_supp(ret, USB_HOST_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}