Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
bb69adb0
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看板
未验证
提交
bb69adb0
编写于
6月 15, 2023
作者:
O
openharmony_ci
提交者:
Gitee
6月 15, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9012 【Openharmony4.0.8.1】【master分支】【sensor子系统】【ToC】【RK3568】【必现】新增计步器用例
Merge pull request !9012 from ldy/master
上级
5d54095d
d9a456ef
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
1832 addition
and
502 deletion
+1832
-502
sensors/miscdevice_standard/Test.json
sensors/miscdevice_standard/Test.json
+4
-1
sensors/sensor_standard/Test.json
sensors/sensor_standard/Test.json
+4
-1
sensors/sensor_standard/src/main/js/test/List.test.js
sensors/sensor_standard/src/main/js/test/List.test.js
+6
-0
sensors/sensor_standard/src/main/js/test/SensorGeneralalgorithm.test.js
..._standard/src/main/js/test/SensorGeneralalgorithm.test.js
+141
-5
sensors/sensor_standard/src/main/js/test/SensorOnOffTest.test_newPedometer.test.js
...rc/main/js/test/SensorOnOffTest.test_newPedometer.test.js
+754
-169
sensors/sensor_standard/src/main/js/test/SensorOnOffTest.test_newSensorGeomagneticOptions.test.js
.../SensorOnOffTest.test_newSensorGeomagneticOptions.test.js
+179
-174
sensors/sensor_standard/src/main/js/test/SensorOnOffTest.test_oldPedometer.test.js
...rc/main/js/test/SensorOnOffTest.test_oldPedometer.test.js
+744
-152
未找到文件。
sensors/miscdevice_standard/Test.json
浏览文件 @
bb69adb0
...
...
@@ -21,7 +21,10 @@
"power-shell wakeup"
,
"uinput -T -m 594 2117 594 864 400"
,
"power-shell setmode 602"
]
],
"teardown-command"
:[
"power-shell setmode 600"
]
}
]
}
\ No newline at end of file
sensors/sensor_standard/Test.json
浏览文件 @
bb69adb0
...
...
@@ -21,7 +21,10 @@
"power-shell wakeup"
,
"uinput -T -m 594 2117 594 864 400"
,
"power-shell setmode 602"
]
],
"teardown-command"
:[
"power-shell setmode 600"
]
}
]
}
\ No newline at end of file
sensors/sensor_standard/src/main/js/test/List.test.js
浏览文件 @
bb69adb0
...
...
@@ -16,6 +16,7 @@ import SystemParameterTest from './SensorOnOffTest.test.js'
import
SensorJsTest_sensor_2
from
'
./SensorGeomagneticTest.test.js
'
import
SensorJsTest_sensor_1
from
'
./SensorGeneralalgorithm.test.js
'
import
SensorJsTest_sensor_60
from
'
./SensorOnOffTest.test_newSensorGeomagnetic.test.js
'
import
SensorJsTest_sensor_38
from
'
./SensorOnOffTest.test_newSensorGeomagneticOptions.test.js
'
import
SensorJsTest_sensor_35
from
'
./SensorOnOffTest.test_newGetSensorList.test.js
'
import
SensorJsTest_sensor_36
from
'
./SensorOnOffTest.test_newGetSingleSensor.test.js
'
import
SensorJsTest_sensor_3
from
'
./SensorOnOffTest.test_oldAccelerometer.test.js
'
...
...
@@ -43,12 +44,15 @@ import SensorJsTest_sensor_8 from './SensorOnOffTest.test_oldBarometer.test.js'
import
SensorJsTest_sensor_26
from
'
./Subscribe_subscribeBarometer.test.js
'
import
SensorJsTest_sensor_57
from
'
./SensorOnOffTest.test_newPedometer_Detection.test.js
'
import
SensorJsTest_sensor_17
from
'
./SensorOnOffTest.test_oldPedometer_Detection.test.js
'
import
SensorJsTest_sensor_56
from
'
./SensorOnOffTest.test_newPedometer.test.js
'
import
SensorJsTest_sensor_18
from
'
./SensorOnOffTest.test_oldPedometer.test.js
'
export
default
function
testsuite
()
{
SystemParameterTest
()
SensorJsTest_sensor_2
()
SensorJsTest_sensor_1
()
SensorJsTest_sensor_60
()
SensorJsTest_sensor_38
()
SensorJsTest_sensor_35
()
SensorJsTest_sensor_36
()
SensorJsTest_sensor_3
()
...
...
@@ -76,4 +80,6 @@ export default function testsuite() {
SensorJsTest_sensor_26
()
SensorJsTest_sensor_57
()
SensorJsTest_sensor_17
()
SensorJsTest_sensor_56
()
SensorJsTest_sensor_18
()
}
sensors/sensor_standard/src/main/js/test/SensorGeneralalgorithm.test.js
浏览文件 @
bb69adb0
...
...
@@ -1095,11 +1095,147 @@ describe("SensorJsTest_sensor_1", function () {
done
()
});
})
/*
* @tc.name:SensorJsTest_111
* @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorsSystem_GeneralAlgorithm_JsTest_0440
*/
it
(
"
SensorJsTest_111
"
,
TestType
.
FUNCTION
|
Size
.
MEDIUMTEST
|
Level
.
LEVEL3
,
async
function
(
done
)
{
console
.
info
(
'
SensorJsTest_111 start
'
)
try
{
sensor
.
getGeomagneticDip
().
then
((
data
)
=>
{
console
.
info
(
"
SensorJsTest_111 data:
"
+
data
)
expect
(
false
).
assertfalse
()
done
()
},
(
error
)
=>
{
console
.
info
(
"
SensorJsTest_111 error:
"
+
error
)
expect
(
error
.
code
).
assertEqual
(
PARAMETER_ERROR_CODE
);
expect
(
error
.
message
).
assertEqual
(
PARAMETER_ERROR_MSG
);
done
()
})
}
catch
(
error
)
{
console
.
info
(
"
SensorJsTest_111 catch error:
"
+
error
);
expect
(
error
.
code
).
assertEqual
(
PARAMETER_ERROR_CODE
);
expect
(
error
.
message
).
assertEqual
(
PARAMETER_ERROR_MSG
);
done
();
}
console
.
info
(
"
SensorJsTest_111 end
"
)
})
/*
* @tc.name:SensorJsTest_112
* @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorsSystem_GeneralAlgorithm_JsTest_0450
*/
it
(
"
SensorJsTest_112
"
,
TestType
.
FUNCTION
|
Size
.
MEDIUMTEST
|
Level
.
LEVEL3
,
async
function
(
done
)
{
console
.
info
(
'
SensorJsTest_112 start
'
)
try
{
sensor
.
getGeomagneticDip
(
-
1
).
then
((
data
)
=>
{
console
.
info
(
"
SensorJsTest_112 data:
"
+
data
)
expect
(
false
).
assertfalse
()
done
()
},
(
error
)
=>
{
console
.
info
(
"
SensorJsTest_112 error:
"
+
error
);
expect
(
error
.
code
).
assertEqual
(
PARAMETER_ERROR_CODE
);
expect
(
error
.
message
).
assertEqual
(
PARAMETER_ERROR_MSG
);
done
()
})
}
catch
(
error
)
{
console
.
info
(
"
SensorJsTest_112 catch error:
"
+
error
);
expect
(
error
.
code
).
assertEqual
(
PARAMETER_ERROR_CODE
);
expect
(
error
.
message
).
assertEqual
(
PARAMETER_ERROR_MSG
);
done
();
}
console
.
info
(
"
SensorJsTest_112 end
"
)
})
/*
* @tc.name:SensorJsTest_113
* @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorsSystem_GeneralAlgorithm_JsTest_0460
*/
it
(
"
SensorJsTest_113
"
,
TestType
.
FUNCTION
|
Size
.
MEDIUMTEST
|
Level
.
LEVEL3
,
async
function
(
done
)
{
console
.
info
(
'
SensorJsTest_113 start
'
)
try
{
sensor
.
getGeomagneticDip
([
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
]).
then
((
data
)
=>
{
console
.
info
(
"
SensorJsTest_113 data:
"
+
data
)
expect
(
data
).
assertEqual
(
0
);
done
()
},
(
error
)
=>
{
console
.
info
(
"
SensorJsTest_113 error:
"
+
error
);
expect
(
error
.
code
).
assertEqual
(
PARAMETER_ERROR_CODE
);
expect
(
error
.
message
).
assertEqual
(
PARAMETER_ERROR_MSG
);
done
()
})
}
catch
(
error
)
{
console
.
info
(
"
SensorJsTest_113 catch error:
"
+
error
);
expect
(
error
.
code
).
assertEqual
(
PARAMETER_ERROR_CODE
);
expect
(
error
.
message
).
assertEqual
(
PARAMETER_ERROR_MSG
);
done
();
}
console
.
info
(
"
SensorJsTest_113 end
"
)
})
})
/*
* @tc.name:SensorJsTest_114
* @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorsSystem_GeneralAlgorithm_JsTest_0470
*/
it
(
"
SensorJsTest_114
"
,
TestType
.
FUNCTION
|
Size
.
MEDIUMTEST
|
Level
.
LEVEL3
,
async
function
(
done
)
{
console
.
info
(
'
SensorJsTest_114 start
'
)
let
inclinationMatrix
=
[
1
,
0
,
0
,
1
,
0
,
1
,
0
,
0
,
0
,
0
,
1
,
0
,
1
,
0
,
0
,
0
]
try
{
sensor
.
getGeomagneticDip
(
inclinationMatrix
).
then
((
data
)
=>
{
console
.
info
(
"
SensorJsTest_114 data:
"
+
data
)
expect
(
data
).
assertEqual
(
0
);
done
()
},
(
error
)
=>
{
console
.
info
(
"
SensorJsTest_114 error:
"
+
error
);
expect
(
error
.
code
).
assertEqual
(
PARAMETER_ERROR_CODE
);
expect
(
error
.
message
).
assertEqual
(
PARAMETER_ERROR_MSG
);
done
()
})
}
catch
(
error
)
{
console
.
info
(
"
SensorJsTest_114 catch error:
"
+
error
);
expect
(
error
.
code
).
assertEqual
(
PARAMETER_ERROR_CODE
);
expect
(
error
.
message
).
assertEqual
(
PARAMETER_ERROR_MSG
);
done
();
}
console
.
info
(
"
SensorJsTest_114 end
"
)
})
}
/*
* @tc.name:SensorJsTest_115
* @tc.desc:Verification results of the incorrect parameters of the test interface.
* @tc.number:SUB_SensorsSystem_GeneralAlgorithm_JsTest_0460
*/
it
(
"
SensorJsTest_115
"
,
TestType
.
FUNCTION
|
Size
.
MEDIUMTEST
|
Level
.
LEVEL3
,
async
function
(
done
)
{
console
.
info
(
'
SensorJsTest_115 start
'
)
try
{
sensor
.
getGeomagneticDip
([
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
1
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
"
SensorJsTest_115 error:
"
+
error
);
expect
(
error
.
code
).
assertEqual
(
PARAMETER_ERROR_CODE
);
expect
(
error
.
message
).
assertEqual
(
PARAMETER_ERROR_MSG
);
done
()
}
else
{
console
.
info
(
"
SensorJsTest_115 data:
"
+
data
)
expect
(
data
).
assertEqual
(
0
);
done
()
}
})
}
catch
(
error
)
{
console
.
info
(
"
SensorJsTest_115 catch error:
"
+
error
);
expect
(
error
.
code
).
assertEqual
(
PARAMETER_ERROR_CODE
);
expect
(
error
.
message
).
assertEqual
(
PARAMETER_ERROR_MSG
);
done
();
}
console
.
info
(
"
SensorJsTest_115 end
"
)
})
})}
sensors/sensor_standard/src/main/js/test/SensorOnOffTest.test_newPedometer.test.js
浏览文件 @
bb69adb0
此差异已折叠。
点击以展开。
sensors/sensor_standard/src/main/js/test/SensorOnOffTest.test_newSensorGeomagneticOptions.test.js
浏览文件 @
bb69adb0
此差异已折叠。
点击以展开。
sensors/sensor_standard/src/main/js/test/SensorOnOffTest.test_oldPedometer.test.js
浏览文件 @
bb69adb0
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录