Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
b641e47f
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
b641e47f
编写于
2月 02, 2023
作者:
O
openharmony_ci
提交者:
Gitee
2月 02, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7370 多模子系统用例整改
Merge pull request !7370 from 岳鑫瑶/cherry-pick-1675238942
上级
22b38397
a9f722fd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
65 addition
and
65 deletion
+65
-65
multimodalinput/input_js_standard/src/main/js/MainAbility/app.js
...dalinput/input_js_standard/src/main/js/MainAbility/app.js
+1
-1
multimodalinput/input_js_standard/src/main/js/test/InputDevice.test.js
...ut/input_js_standard/src/main/js/test/InputDevice.test.js
+57
-57
multimodalinput/input_js_standard/src/main/js/test/List.test.js
...odalinput/input_js_standard/src/main/js/test/List.test.js
+4
-4
multimodalinput/input_js_standard/src/main/js/test/Pointer.test.js
...linput/input_js_standard/src/main/js/test/Pointer.test.js
+2
-2
multimodalinput/multimodalinput_ets_standard/entry/src/main/ets/test/MultimodalInputEventType.test.ets
...entry/src/main/ets/test/MultimodalInputEventType.test.ets
+1
-1
未找到文件。
multimodalinput/input_js_standard/src/main/js/MainAbility/app.js
浏览文件 @
b641e47f
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
import
{
Hypium
}
from
'
@ohos/hypium
'
import
{
Hypium
}
from
'
@ohos/hypium
'
import
testsuite
from
'
../test/List
Multimodalinput
.test
'
import
testsuite
from
'
../test/List.test
'
export
default
{
export
default
{
onCreate
()
{
onCreate
()
{
...
...
multimodalinput/input_js_standard/src/main/js/test/InputDevice.test.js
浏览文件 @
b641e47f
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
import
inputDevice
from
'
@ohos.multimodalInput.inputDevice
'
;
import
inputDevice
from
'
@ohos.multimodalInput.inputDevice
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
,
TestType
,
Size
,
Level
}
from
'
@ohos/hypium
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
,
TestType
,
Size
,
Level
}
from
'
@ohos/hypium
'
export
default
function
MultimodalInput_
Device_test
()
{
export
default
function
Input
Device_test
()
{
describe
(
'
MultimodalInput_
Device_test
'
,
function
()
{
describe
(
'
Input
Device_test
'
,
function
()
{
const
errCode
=
{
const
errCode
=
{
COMMON_PARAMETER_CODE
:
401
COMMON_PARAMETER_CODE
:
401
...
@@ -30,8 +30,8 @@ export default function MultimodalInput_Device_test() {
...
@@ -30,8 +30,8 @@ export default function MultimodalInput_Device_test() {
}
}
// 参数正确,返回一个数组
// 参数正确,返回一个数组
it
(
"
InputDevice_getDeviceIds_test
-
01
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getDeviceIds_test
_
01
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getDeviceIds_test
-
01 enter`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
01 enter`
);
try
{
try
{
inputDevice
.
getDeviceIds
((
err
,
data
)
=>
{
inputDevice
.
getDeviceIds
((
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
...
@@ -39,53 +39,53 @@ export default function MultimodalInput_Device_test() {
...
@@ -39,53 +39,53 @@ export default function MultimodalInput_Device_test() {
}
else
{
}
else
{
expect
(
data
).
assertInstanceOf
(
'
Array
'
);
expect
(
data
).
assertInstanceOf
(
'
Array
'
);
}
}
console
.
info
(
`InputDevice_getDeviceIds_test
-
01 exit`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
01 exit`
);
done
();
done
();
})
})
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
info
(
`InputDevice_getDeviceIds_test
-
01 error`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
01 error`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
}
})
})
// 参数正确,判断一种或多种设备
// 参数正确,判断一种或多种设备
it
(
"
InputDevice_getDeviceIds_test
-
02
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getDeviceIds_test
_
02
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getDeviceIds_test
-
02 enter`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
02 enter`
);
try
{
try
{
inputDevice
.
getDeviceIds
((
err
,
data
)
=>
{
inputDevice
.
getDeviceIds
((
err
,
data
)
=>
{
console
.
info
(
`InputDevice_getDeviceIds_test
-
02 err:
${
JSON
.
stringify
(
err
)}
`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
02 err:
${
JSON
.
stringify
(
err
)}
`
);
console
.
info
(
`InputDevice_getDeviceIds_test
-
02 data:
${
JSON
.
stringify
(
data
)}
`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
02 data:
${
JSON
.
stringify
(
data
)}
`
);
if
(
err
)
{
if
(
err
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
expect
(
data
.
length
>
0
).
assertTrue
();
expect
(
data
.
length
>
0
).
assertTrue
();
}
}
console
.
info
(
`InputDevice_getDeviceIds_test
-
02 exit`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
02 exit`
);
done
();
done
();
})
})
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
info
(
`InputDevice_getDeviceIds_test
-
02 error`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
02 error`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
}
})
})
// 参数类型错误
// 参数类型错误
it
(
"
InputDevice_getDeviceIds_test
-
03
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getDeviceIds_test
_
03
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getDeviceIds_test
-
03 enter`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
03 enter`
);
try
{
try
{
inputDevice
.
getDeviceIds
(
-
1
);
inputDevice
.
getDeviceIds
(
-
1
);
}
catch
(
error
)
{
}
catch
(
error
)
{
expect
(
error
.
message
).
assertEqual
(
"
GetDeviceIds:
\"
The first parameter type is wrong
\"
"
);
expect
(
error
.
message
).
assertEqual
(
"
GetDeviceIds:
\"
The first parameter type is wrong
\"
"
);
}
}
console
.
info
(
`InputDevice_getDeviceIds_test
-
03 exit`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
03 exit`
);
done
();
done
();
})
})
// 参数数量错误
// 参数数量错误
it
(
"
InputDevice_getDeviceIds_test
-
04
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getDeviceIds_test
_
04
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getDeviceIds_test
-
04 enter`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
04 enter`
);
try
{
try
{
inputDevice
.
getDeviceIds
(
-
1
,
(
err
,
data
)
=>
{
inputDevice
.
getDeviceIds
(
-
1
,
(
err
,
data
)
=>
{
console
.
info
(
data
);
console
.
info
(
data
);
...
@@ -93,25 +93,25 @@ export default function MultimodalInput_Device_test() {
...
@@ -93,25 +93,25 @@ export default function MultimodalInput_Device_test() {
}
catch
(
error
)
{
}
catch
(
error
)
{
expect
(
error
.
message
).
assertEqual
(
"
GetDeviceIds:
\"
too many parameters
\"
"
);
expect
(
error
.
message
).
assertEqual
(
"
GetDeviceIds:
\"
too many parameters
\"
"
);
}
}
console
.
info
(
`InputDevice_getDeviceIds_test
-
04 exit`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
04 exit`
);
done
();
done
();
})
})
// 无效的设备id
// 无效的设备id
it
(
"
InputDevice_getDevice_test
-
01
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getDevice_test
_
01
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getDevice_test
-
01 enter`
);
console
.
info
(
`InputDevice_getDevice_test
_
01 enter`
);
try
{
try
{
inputDevice
.
getDevice
(
-
1
,
(
err
,
data
)
=>
{
inputDevice
.
getDevice
(
-
1
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
console
.
info
(
`InputDevice_getDevice_test
-
01
${
JSON
.
stringify
(
err
)}
`
);
console
.
info
(
`InputDevice_getDevice_test
_
01
${
JSON
.
stringify
(
err
)}
`
);
}
else
{
}
else
{
expect
(
JSON
.
stringify
(
data
)
!==
"
{}
"
).
assertTrue
();
expect
(
JSON
.
stringify
(
data
)
!==
"
{}
"
).
assertTrue
();
}
}
console
.
info
(
`InputDevice_getDevice_test
-
01 exit`
);
console
.
info
(
`InputDevice_getDevice_test
_
01 exit`
);
})
})
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
info
(
`InputDevice_getDevice_test
-
01 error`
);
console
.
info
(
`InputDevice_getDevice_test
_
01 error`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
finally
{
}
finally
{
done
();
done
();
...
@@ -119,21 +119,21 @@ export default function MultimodalInput_Device_test() {
...
@@ -119,21 +119,21 @@ export default function MultimodalInput_Device_test() {
})
})
// 参数正常,返回值正常
// 参数正常,返回值正常
it
(
"
InputDevice_getDevice_test
-
02
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getDevice_test
_
02
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getDevice_test
-
02 enter`
);
console
.
info
(
`InputDevice_getDevice_test
_
02 enter`
);
try
{
try
{
inputDevice
.
getDeviceIds
(
async
(
err
,
data
)
=>
{
inputDevice
.
getDeviceIds
(
async
(
err
,
data
)
=>
{
console
.
info
(
`InputDevice_getDeviceIds_test
-
02 err:
${
JSON
.
stringify
(
err
)}
`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
02 err:
${
JSON
.
stringify
(
err
)}
`
);
console
.
info
(
`InputDevice_getDeviceIds_test
-
02 data:
${
JSON
.
stringify
(
data
)}
`
);
console
.
info
(
`InputDevice_getDeviceIds_test
_
02 data:
${
JSON
.
stringify
(
data
)}
`
);
if
(
err
)
{
if
(
err
)
{
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
else
{
}
else
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
console
.
info
(
`InputDevice_getDevice_test
-
02 for`
);
console
.
info
(
`InputDevice_getDevice_test
_
02 for`
);
await
getDevicePromise
(
data
[
i
])
await
getDevicePromise
(
data
[
i
])
}
}
function
getDevicePromise
(
data
)
{
function
getDevicePromise
(
data
)
{
console
.
info
(
`InputDevice_getDevice_test
-
02 getDevicePromise`
)
console
.
info
(
`InputDevice_getDevice_test
_
02 getDevicePromise`
)
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
inputDevice
.
getDevice
(
data
,
(
err
,
res
)
=>
{
inputDevice
.
getDevice
(
data
,
(
err
,
res
)
=>
{
console
.
info
(
`getDevice:data =
${
JSON
.
stringify
(
data
)}
`
);
console
.
info
(
`getDevice:data =
${
JSON
.
stringify
(
data
)}
`
);
...
@@ -150,7 +150,7 @@ export default function MultimodalInput_Device_test() {
...
@@ -150,7 +150,7 @@ export default function MultimodalInput_Device_test() {
expect
(
res
.
phys
).
assertInstanceOf
(
'
String
'
);
expect
(
res
.
phys
).
assertInstanceOf
(
'
String
'
);
expect
(
res
.
uniq
).
assertInstanceOf
(
'
String
'
);
expect
(
res
.
uniq
).
assertInstanceOf
(
'
String
'
);
expect
(
res
).
assertInstanceOf
(
'
Object
'
);
expect
(
res
).
assertInstanceOf
(
'
Object
'
);
console
.
info
(
`InputDevice_getDevice_test
-
02 getDevice expect res`
);
console
.
info
(
`InputDevice_getDevice_test
_
02 getDevice expect res`
);
for
(
let
j
=
0
;
j
<
res
.
axisRanges
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
res
.
axisRanges
.
length
;
j
++
)
{
expect
(
res
.
axisRanges
[
j
].
source
==
'
keyboard
'
||
res
.
axisRanges
[
j
].
source
==
'
mouse
'
expect
(
res
.
axisRanges
[
j
].
source
==
'
keyboard
'
||
res
.
axisRanges
[
j
].
source
==
'
mouse
'
||
res
.
axisRanges
[
j
].
source
==
'
touchpad
'
||
res
.
axisRanges
[
j
].
source
==
'
touchscreen
'
||
res
.
axisRanges
[
j
].
source
==
'
touchpad
'
||
res
.
axisRanges
[
j
].
source
==
'
touchscreen
'
...
@@ -172,19 +172,19 @@ export default function MultimodalInput_Device_test() {
...
@@ -172,19 +172,19 @@ export default function MultimodalInput_Device_test() {
})
})
}
}
}
}
console
.
info
(
`InputDevice_getDevice_test
-
02 exit`
);
console
.
info
(
`InputDevice_getDevice_test
_
02 exit`
);
done
();
done
();
});
});
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
info
(
`InputDevice_getDevice_test
-
02 error`
);
console
.
info
(
`InputDevice_getDevice_test
_
02 error`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
}
})
})
// 参数正常,返回值正常
// 参数正常,返回值正常
it
(
"
InputDevice_supportKeys_test
-
01
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_supportKeys_test
_
01
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_supportKeys_test
-
01 enter`
);
console
.
info
(
`InputDevice_supportKeys_test
_
01 enter`
);
try
{
try
{
inputDevice
.
getDeviceIds
((
err
,
data
)
=>
{
inputDevice
.
getDeviceIds
((
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
...
@@ -196,19 +196,19 @@ export default function MultimodalInput_Device_test() {
...
@@ -196,19 +196,19 @@ export default function MultimodalInput_Device_test() {
});
});
}
}
}
}
console
.
info
(
`InputDevice_supportKeys_test
-
01 exit`
);
console
.
info
(
`InputDevice_supportKeys_test
_
01 exit`
);
done
();
done
();
});
});
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
info
(
`InputDevice_supportKeys_test
-
01 error`
);
console
.
info
(
`InputDevice_supportKeys_test
_
01 error`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
}
})
})
// 第二个参数异常
// 第二个参数异常
it
(
"
InputDevice_supportKeys_test
-
02
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_supportKeys_test
_
02
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_supportKeys_test
-
02 enter`
);
console
.
info
(
`InputDevice_supportKeys_test
_
02 enter`
);
try
{
try
{
inputDevice
.
supportKeys
(
0
,
2022
,
(
err
,
res
)
=>
{
inputDevice
.
supportKeys
(
0
,
2022
,
(
err
,
res
)
=>
{
console
.
info
(
res
);
console
.
info
(
res
);
...
@@ -216,13 +216,13 @@ export default function MultimodalInput_Device_test() {
...
@@ -216,13 +216,13 @@ export default function MultimodalInput_Device_test() {
}
catch
(
error
)
{
}
catch
(
error
)
{
expect
(
error
.
message
).
assertEqual
(
"
Parameter error. The type of keys must be array.
"
);
expect
(
error
.
message
).
assertEqual
(
"
Parameter error. The type of keys must be array.
"
);
}
}
console
.
info
(
`InputDevice_supportKeys_test
-
02 exit`
);
console
.
info
(
`InputDevice_supportKeys_test
_
02 exit`
);
done
();
done
();
})
})
// 参数正常
// 参数正常
it
(
"
InputDevice_getKeyboardType_test
-
01
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getKeyboardType_test
_
01
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getKeyboardType_test
-
01 enter`
);
console
.
info
(
`InputDevice_getKeyboardType_test
_
01 enter`
);
try
{
try
{
inputDevice
.
getDeviceIds
((
err
,
data
)
=>
{
inputDevice
.
getDeviceIds
((
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
...
@@ -234,31 +234,31 @@ export default function MultimodalInput_Device_test() {
...
@@ -234,31 +234,31 @@ export default function MultimodalInput_Device_test() {
});
});
}
}
}
}
console
.
info
(
`InputDevice_getKeyboardType_test
-
01 exit`
);
console
.
info
(
`InputDevice_getKeyboardType_test
_
01 exit`
);
done
();
done
();
});
});
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
info
(
`InputDevice_getKeyboardType_test
-
01 error`
);
console
.
info
(
`InputDevice_getKeyboardType_test
_
01 error`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
}
})
})
//参数异常
//参数异常
it
(
"
InputDevice_getKeyboardType_test
-
02
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getKeyboardType_test
_
02
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getKeyboardType_test
-
02 enter`
);
console
.
info
(
`InputDevice_getKeyboardType_test
_
02 enter`
);
try
{
try
{
inputDevice
.
getKeyboardType
(
-
1
);
inputDevice
.
getKeyboardType
(
-
1
);
}
catch
(
error
)
{
}
catch
(
error
)
{
expect
(
error
.
message
).
assertEqual
(
"
Invalid input device id
"
);
expect
(
error
.
message
).
assertEqual
(
"
Invalid input device id
"
);
}
}
console
.
info
(
`InputDevice_getKeyboardType_test
-
02 exit`
);
console
.
info
(
`InputDevice_getKeyboardType_test
_
02 exit`
);
done
();
done
();
});
});
// 参数正常
// 参数正常
it
(
"
InputDevice_getKeyboardType_test
-
03
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getKeyboardType_test
_
03
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getKeyboardType_test
-
03 enter`
);
console
.
info
(
`InputDevice_getKeyboardType_test
_
03 enter`
);
try
{
try
{
inputDevice
.
getDeviceIds
((
err
,
data
)
=>
{
inputDevice
.
getDeviceIds
((
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
...
@@ -268,16 +268,16 @@ export default function MultimodalInput_Device_test() {
...
@@ -268,16 +268,16 @@ export default function MultimodalInput_Device_test() {
inputDevice
.
getKeyboardType
(
data
[
i
]).
then
((
res
)
=>
{
inputDevice
.
getKeyboardType
(
data
[
i
]).
then
((
res
)
=>
{
expect
(
res
).
assertInstanceOf
(
'
Number
'
);
expect
(
res
).
assertInstanceOf
(
'
Number
'
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
info
(
`InputDevice_getKeyboardType_test
-
03 failed, err=
${
JSON
.
stringify
(
err
)}
`
);
console
.
info
(
`InputDevice_getKeyboardType_test
_
03 failed, err=
${
JSON
.
stringify
(
err
)}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
});
});
}
}
}
}
console
.
info
(
`InputDevice_getKeyboardType_test
-
03 exit`
);
console
.
info
(
`InputDevice_getKeyboardType_test
_
03 exit`
);
done
();
done
();
});
});
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
info
(
`InputDevice_getKeyboardType_test
-
03 error`
);
console
.
info
(
`InputDevice_getKeyboardType_test
_
03 error`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
done
();
}
}
...
@@ -461,7 +461,7 @@ export default function MultimodalInput_Device_test() {
...
@@ -461,7 +461,7 @@ export default function MultimodalInput_Device_test() {
* @tc.name MultimodalInputDevice_GetDeviceList_test
* @tc.name MultimodalInputDevice_GetDeviceList_test
* @tc.desc inputdevice interface getDeviceList test
* @tc.desc inputdevice interface getDeviceList test
*/
*/
it
(
"
InputDevice_getDeviceList_test
-
01
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getDeviceList_test
_
01
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getDeviceList_async_test enter`
);
console
.
info
(
`InputDevice_getDeviceList_async_test enter`
);
try
{
try
{
inputDevice
.
getDeviceList
((
err
,
data
)
=>
{
inputDevice
.
getDeviceList
((
err
,
data
)
=>
{
...
@@ -485,7 +485,7 @@ export default function MultimodalInput_Device_test() {
...
@@ -485,7 +485,7 @@ export default function MultimodalInput_Device_test() {
* @tc.name MultimodalInputDevice_GetDeviceList_test
* @tc.name MultimodalInputDevice_GetDeviceList_test
* @tc.desc inputdevice interface getDeviceList test
* @tc.desc inputdevice interface getDeviceList test
*/
*/
it
(
"
InputDevice_getDeviceList_test
-
02
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getDeviceList_test
_
02
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getDeviceList_promise_test enter`
);
console
.
info
(
`InputDevice_getDeviceList_promise_test enter`
);
try
{
try
{
inputDevice
.
getDeviceList
().
then
(
data
=>
{
inputDevice
.
getDeviceList
().
then
(
data
=>
{
...
@@ -505,7 +505,7 @@ export default function MultimodalInput_Device_test() {
...
@@ -505,7 +505,7 @@ export default function MultimodalInput_Device_test() {
* @tc.name MultimodalInputDevice_GetDeviceInfo_test
* @tc.name MultimodalInputDevice_GetDeviceInfo_test
* @tc.desc inputdevice interface getDeviceInfo test
* @tc.desc inputdevice interface getDeviceInfo test
*/
*/
it
(
"
InputDevice_getDeviceInfo_test
-
01
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getDeviceInfo_test
_
01
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getDeviceInfo_async_test enter`
);
console
.
info
(
`InputDevice_getDeviceInfo_async_test enter`
);
try
{
try
{
await
inputDevice
.
getDeviceList
().
then
((
data
)
=>
{
await
inputDevice
.
getDeviceList
().
then
((
data
)
=>
{
...
@@ -557,12 +557,12 @@ export default function MultimodalInput_Device_test() {
...
@@ -557,12 +557,12 @@ export default function MultimodalInput_Device_test() {
done
()
done
()
})
})
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
info
(
`InputDevice_getDeviceInfo_test
-
01 inputDevice.getDeviceInfo
${
JSON
.
stringify
(
err
)}
`
);
console
.
info
(
`InputDevice_getDeviceInfo_test
_
01 inputDevice.getDeviceInfo
${
JSON
.
stringify
(
err
)}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
})
})
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
info
(
`InputDevice_getDeviceInfo_test
-
01 inputDevice.getDeviceList
${
JSON
.
stringify
(
err
)}
`
);
console
.
info
(
`InputDevice_getDeviceInfo_test
_
01 inputDevice.getDeviceList
${
JSON
.
stringify
(
err
)}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
console
.
info
(
`InputDevice_getDeviceInfo_async_test exit`
);
console
.
info
(
`InputDevice_getDeviceInfo_async_test exit`
);
...
@@ -573,7 +573,7 @@ export default function MultimodalInput_Device_test() {
...
@@ -573,7 +573,7 @@ export default function MultimodalInput_Device_test() {
* @tc.name MultimodalInputDevice_GetDeviceInfo_test
* @tc.name MultimodalInputDevice_GetDeviceInfo_test
* @tc.desc inputdevice interface getDeviceInfo test
* @tc.desc inputdevice interface getDeviceInfo test
*/
*/
it
(
"
InputDevice_getDeviceInfo_test
-
02
"
,
0
,
async
function
(
done
)
{
it
(
"
InputDevice_getDeviceInfo_test
_
02
"
,
0
,
async
function
(
done
)
{
console
.
info
(
`InputDevice_getDeviceInfo_promise_test enter`
);
console
.
info
(
`InputDevice_getDeviceInfo_promise_test enter`
);
try
{
try
{
inputDevice
.
getDeviceList
().
then
((
data
)
=>
{
inputDevice
.
getDeviceList
().
then
((
data
)
=>
{
...
...
multimodalinput/input_js_standard/src/main/js/test/List
Multimodalinput
.test.js
→
multimodalinput/input_js_standard/src/main/js/test/List.test.js
浏览文件 @
b641e47f
...
@@ -13,11 +13,11 @@
...
@@ -13,11 +13,11 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
MultimodalInput_
Device_test
from
'
./InputDevice.test.js
'
import
Input
Device_test
from
'
./InputDevice.test.js
'
import
MultimodalInput_KeyCode_test
from
'
./MultimodalInput_KeyCode.test.js
'
import
MultimodalInput_KeyCode_test
from
'
./MultimodalInput_KeyCode.test.js
'
import
MultimodalInput_
Pointer_test
from
'
./Pointer.test.js
'
import
Pointer_test
from
'
./Pointer.test.js
'
export
default
function
testsuite
()
{
export
default
function
testsuite
()
{
MultimodalInput_
Device_test
()
Input
Device_test
()
MultimodalInput_KeyCode_test
()
MultimodalInput_KeyCode_test
()
MultimodalInput_
Pointer_test
()
Pointer_test
()
}
}
\ No newline at end of file
multimodalinput/input_js_standard/src/main/js/test/Pointer.test.js
浏览文件 @
b641e47f
...
@@ -16,8 +16,8 @@
...
@@ -16,8 +16,8 @@
import
pointer
from
'
@ohos.multimodalInput.pointer
'
import
pointer
from
'
@ohos.multimodalInput.pointer
'
import
window
from
'
@ohos.window
'
import
window
from
'
@ohos.window
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
,
TestType
,
Size
,
Level
}
from
'
@ohos/hypium
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
,
TestType
,
Size
,
Level
}
from
'
@ohos/hypium
'
export
default
function
MultimodalInput_
Pointer_test
()
{
export
default
function
Pointer_test
()
{
describe
(
'
MultimodalInput_
Pointer_test
'
,
function
()
{
describe
(
'
Pointer_test
'
,
function
()
{
const
errCode
=
{
const
errCode
=
{
COMMON_PARAMETER_CODE
:
401
COMMON_PARAMETER_CODE
:
401
...
...
multimodalinput/multimodalinput_ets_standard/entry/src/main/ets/test/MultimodalInputEventType.test.ets
浏览文件 @
b641e47f
...
@@ -24,7 +24,7 @@ import { Touch, TouchEvent } from '@ohos.multimodalInput.touchEvent'
...
@@ -24,7 +24,7 @@ import { Touch, TouchEvent } from '@ohos.multimodalInput.touchEvent'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, TestType, Size, Level } from '@ohos/hypium'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, TestType, Size, Level } from '@ohos/hypium'
export default function MultimodalInputEventTypeTest() {
export default function MultimodalInputEventTypeTest() {
describe('MultimodalInput
_t
est', function () {
describe('MultimodalInput
EventTypeT
est', function () {
it('MultimodalInput_KeyEventTypeTest_0010', 0, function () {
it('MultimodalInput_KeyEventTypeTest_0010', 0, function () {
console.info(`MultimodalInput_KeyEventTypeTest_0010 enter`);
console.info(`MultimodalInput_KeyEventTypeTest_0010 enter`);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录