提交 72bc1509 编写于 作者: G GuoxYu

【usb】【master】新增USBConfig属性反向测试用例

Signed-off-by: NGuoxYu <guoxiaoyu12@huawei.com>
Change-Id: Ifccaaa26e751d74ded08e17fb3e430e12cd1ea37
上级 0780e13d
...@@ -768,5 +768,29 @@ describe('UsbDevicePipeJsFunctionsTestEx', function () { ...@@ -768,5 +768,29 @@ describe('UsbDevicePipeJsFunctionsTestEx', function () {
console.info('usb set_configuration_test_05 : PASS'); console.info('usb set_configuration_test_05 : PASS');
}) })
/**
* @tc.number : SUB_USB_set_configuration_test_06
* @tc.name : setConfiguration
* @tc.desc : 反向测试 USBConfig的name interval(1-16) 赋值错误 设置设备接口
*/
it('SUB_USB_set_configuration_test_06', 0, function () {
console.info('usb set_configuration_test_06 begin');
if (gDeviceList.length == 0) {
console.info('usb case get_device_list is null')
expect(false).assertTrue();
return
}
for (var j = 0; j < gDeviceList[0].configs.length; j++) {
var config = gDeviceList[0].configs[j]
config.name = 'asdfsd'
config.interfaces[0].endpoints[0].interval = 0
var ret = usb.setConfiguration(gPipe, config)
console.info('usb case setConfiguration return : ' + ret);
expect(ret).assertLess(0);
}
console.info('usb set_configuration_test_06 : PASS');
})
}) })
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册