Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f508beed
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看板
未验证
提交
f508beed
编写于
1月 12, 2022
作者:
O
openharmony_ci
提交者:
Gitee
1月 12, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1553 add sensor js interface testcases
Merge pull request !1553 from liuzixuan10/master
上级
580f9484
de50bf7a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
297 addition
and
280 deletion
+297
-280
sensors/sensor_standard/src/main/js/default/test/SensorGeomagneticTest.test.js
...rd/src/main/js/default/test/SensorGeomagneticTest.test.js
+297
-280
未找到文件。
sensors/sensor_standard/src/main/js/default/test/SensorGeomagneticTest.test.js
浏览文件 @
f508beed
...
...
@@ -82,12 +82,12 @@ describe("SensorJsTest", function () {
let
timeMillis
=
[
1580486400000
,
1612108800000
,
1643644800000
,
1675180800000
,
1706716800000
]
/**
* @tc.number:
Geomagentic_Sensor_Test
0010
* @tc.name: SensorGeomagenticTest001
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0010
* @tc.name: SensorGeomagentic
AlgorithmJS
Test001
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0010
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0010---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0010
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0010
-------------------------
"
);
let
promiseArray
=
[]
for
(
let
i
=
0
;
i
<
timeMillis
.
length
;
i
++
)
{
promiseArray
.
push
(
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -95,13 +95,13 @@ describe("SensorJsTest", function () {
sensor
.
getGeomagneticField
({
'
latitude
'
:
80
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
j
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagentic
Test0010
failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJSTest001
failed
'
);
expect
(
false
).
assertTrue
();
setTimeout
((
err
)
=>
{
reject
(
err
)
},
500
)
}
else
{
console
.
info
(
'
SensorGeomagentic
Test0010
success x:
'
+
data
.
x
+
'
,y:
'
console
.
info
(
'
SensorGeomagentic
AlgorithmJSTest001
success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -123,12 +123,12 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0020
* @tc.name: SensorGeomagenticTest002
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0020
* @tc.name: SensorGeomagentic
AlgorithmJS
Test002
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0020
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0020---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0020
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0020
-------------------------
"
);
let
promiseArray
=
[]
for
(
let
i
=
0
;
i
<
GEOMAGNETIC_COORDINATES
.
length
;
i
++
)
{
promiseArray
.
push
(
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -138,13 +138,14 @@ describe("SensorJsTest", function () {
'
longitude
'
:
GEOMAGNETIC_COORDINATES
[
j
][
1
],
'
altitude
'
:
GEOMAGNETIC_COORDINATES
[
j
][
2
]
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest002 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test002 failed
'
);
expect
(
false
).
assertTrue
();
setTimeout
((
err
)
=>
{
reject
(
err
)
},
500
)
}
else
{
console
.
info
(
'
SensorGeomagenticTest002 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest002 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -166,21 +167,21 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0030
* @tc.name: SensorGeomagenticTest003
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0030
* @tc.name: SensorGeomagentic
AlgorithmJS
Test003
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0030
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0030---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0030
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0030
-------------------------
"
);
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
Number
.
MAX_VALUE
,
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest003 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test003 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest003 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test003 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -199,21 +200,22 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0040
* @tc.name: SensorGeomagenticTest004
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0040
* @tc.name: SensorGeomagentic
AlgorithmJS
Test004
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0040
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0040---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0040
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0040
-------------------------
"
);
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
Number
.
MIN_VALUE
,
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest004 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test004 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest004 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest004 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -232,21 +234,21 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0050
* @tc.name: SensorGeomagenticTest005
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0050
* @tc.name: SensorGeomagentic
AlgorithmJS
Test005
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0050
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0050---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0050
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0050
-------------------------
"
);
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
MAX_VALUE
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest005 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test005 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest005 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test005 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -265,21 +267,21 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0060
* @tc.name: SensorGeomagenticTest006
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0060
* @tc.name: SensorGeomagentic
AlgorithmJS
Test006
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0060
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0060---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0060
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0060
-------------------------
"
);
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NaN
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest006 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test006 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest006 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test006 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -298,21 +300,22 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0070
* @tc.name: SensorGeomagenticTest007
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0070
* @tc.name: SensorGeomagentic
AlgorithmJS
Test007
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0070
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0070---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0070
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0070
-------------------------
"
);
let
geomagneticComponent
=
[
14425.57421875
,
-
17156.767578125
,
-
52023.21484375
,
-
66.69005584716797
,
-
49.94255447387695
,
22415.4375
,
56646.859375
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest007 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test007 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest007 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest007 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -331,19 +334,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0080
* @tc.name: SensorGeomagenticTest008
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0080
* @tc.name: SensorGeomagentic
AlgorithmJS
Test008
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0080
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0080---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0080
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0080
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest008 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test008 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest008 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest008 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -356,19 +360,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0090
* @tc.name: SensorGeomagenticTest009
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0090
* @tc.name: SensorGeomagentic
AlgorithmJS
Test009
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0090
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0090---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0090
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0090
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest009 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test009 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest009 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest009 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -381,19 +386,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0100
* @tc.name: SensorGeomagenticTest010
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0100
* @tc.name: SensorGeomagentic
AlgorithmJS
Test010
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0100---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0100
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest010 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test010 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest010 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest010 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -406,19 +412,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0110
* @tc.name: SensorGeomagenticTest011
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0110
* @tc.name: SensorGeomagentic
AlgorithmJS
Test011
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0110
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0110---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0110
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0110
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest011 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test011 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest011 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest011 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -431,21 +438,22 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0120
* @tc.name: SensorGeomagenticTest012
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0120
* @tc.name: SensorGeomagentic
AlgorithmJS
Test012
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0120
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0120---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0120
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0120
-------------------------
"
);
let
geomagneticComponent
=
[
27536.40234375
,
-
2248.586669921875
,
-
16022.4306640625
,
-
30.110872268676758
,
-
4.66834020614624
,
27628.05859375
,
31937.875
]
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MIN_VALUE
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest012 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test012 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest012 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest012 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -464,19 +472,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0130
* @tc.name: SensorGeomagenticTest013
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0130
* @tc.name: SensorGeomagentic
AlgorithmJS
Test013
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0130
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0130---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0130
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0130
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest013 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test013 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest013 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest013 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -489,19 +498,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0140
* @tc.name: SensorGeomagenticTest014
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0140
* @tc.name: SensorGeomagentic
AlgorithmJS
Test014
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0140
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0140---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0140
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0140
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest014 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test014 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest014 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest014 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -514,19 +524,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0150
* @tc.name: SensorGeomagenticTest015
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0150
* @tc.name: SensorGeomagentic
AlgorithmJS
Test015
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0150
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0150---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0150
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0150
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest015 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test015 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest015 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest015 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -539,19 +550,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0160
* @tc.name: SensorGeomagenticTest016
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0160
* @tc.name: SensorGeomagentic
AlgorithmJS
Test016
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0160
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0160---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0160
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0160
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest016 once success
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test016 once success
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest016 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest016 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -564,19 +576,19 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0170
* @tc.name: SensorGeomagenticTest017
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0170
* @tc.name: SensorGeomagentic
AlgorithmJS
Test017
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0170
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0170---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0170
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0170
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest017 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test017 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest017 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test017 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -589,19 +601,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0180
* @tc.name: SensorGeomagenticTest018
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0180
* @tc.name: SensorGeomagentic
AlgorithmJS
Test018
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0180
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0180---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0180
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0180
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest018 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test018 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest018 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest018 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -614,19 +627,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0190
* @tc.name: SensorGeomagenticTest019
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0190
* @tc.name: SensorGeomagentic
AlgorithmJS
Test019
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0190
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0190---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0190
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0190
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest019 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test019 failed
'
);
expect
(
false
).
assertfalse
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest019 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest019 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -639,19 +653,19 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0200
* @tc.name: SensorGeomagenticTest020
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0200
* @tc.name: SensorGeomagentic
AlgorithmJS
Test020
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0200---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0200
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest020 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test020 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest020 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test020 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -664,19 +678,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0210
* @tc.name: SensorGeomagenticTest021
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0210
* @tc.name: SensorGeomagentic
AlgorithmJS
Test021
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0210
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0210---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0210
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0210
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest021 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test021 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest021 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest021 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -689,19 +704,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0220
* @tc.name: SensorGeomagenticTest022
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0220
* @tc.name: SensorGeomagentic
AlgorithmJS
Test022
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0220
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0220---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0220
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0220
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest022 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test022 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest022 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest022 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -714,19 +730,20 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0230
* @tc.name: SensorGeomagenticTest023
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0230
* @tc.name: SensorGeomagentic
AlgorithmJS
Test023
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0230
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0230---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0230
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0230
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest023 failed
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test023 failed
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest023 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagenticAlgorithmJSTest023 success x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -739,19 +756,19 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0240
* @tc.name: SensorGeomagenticTest024
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0240
* @tc.name: SensorGeomagentic
AlgorithmJS
Test024
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0240
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0240---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0240
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0240
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest024 once success
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test024 once success
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest024 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test024 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -764,19 +781,19 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0250
* @tc.name: SensorGeomagenticTest025
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0250
* @tc.name: SensorGeomagentic
AlgorithmJS
Test025
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
'
Geomagentic_Sensor_Test
0250
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0250---------
-------------------------
"
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0250
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0250
-------------------------
"
);
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
],
(
error
,
data
)
=>
{
if
(
error
)
{
console
.
info
(
'
SensorGeomagenticTest025 once success
'
);
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test025 once success
'
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
'
SensorGeomagenticTest025 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test025 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -789,16 +806,16 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0260
* @tc.name: SensorGeomagenticTest026
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0260
* @tc.name: SensorGeomagentic
AlgorithmJS
Test026
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
"
Geomagentic_Sensor_Test
0260
"
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
---------Geomagentic_Sensor_Test0260---------
-------------------------
"
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0260
"
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0260
-------------------------
"
);
for
(
var
i
=
0
;
i
<
timeMillis
.
length
;
i
++
)
{
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
80
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
i
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest026 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test026 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
);
...
...
@@ -817,17 +834,17 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0270
* @tc.name: SensorGeomagenticTest027
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0270
* @tc.name: SensorGeomagentic
AlgorithmJS
Test027
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
"
Geomagentic_Sensor_Test
0270
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0270---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0270
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0270
------------------
'
);
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
Number
.
MAX_VALUE
).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest027 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test027 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -845,17 +862,17 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0280
* @tc.name: SensorGeomagenticTest028
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0280
* @tc.name: SensorGeomagentic
AlgorithmJS
Test028
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
"
Geomagentic_Sensor_Test
0280
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0280---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0280
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0280
------------------
'
);
let
geomagneticComponent
=
[
27779.234375
,
-
6214.9794921875
,
-
14924.6611328125
,
-
27.667943954467773
,
-
12.610970497131348
,
28465.9765625
,
32141.2109375
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
Number
.
MIN_VALUE
).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest028 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test028 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -873,17 +890,17 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0290
* @tc.name: SensorGeomagenticTest029
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0290
* @tc.name: SensorGeomagentic
AlgorithmJS
Test029
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
"
Geomagentic_Sensor_Test
0290
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0290---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0290
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0290
------------------
'
);
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
MAX_VALUE
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest029 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test029 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -901,17 +918,17 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0300
* @tc.name: SensorGeomagenticTest030
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0300
* @tc.name: SensorGeomagentic
AlgorithmJS
Test030
* @tc.desc: Verification results of the incorrect parameters of the test interface.
*/
it
(
"
Geomagentic_Sensor_Test
0300
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0300---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0300
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0300
------------------
'
);
let
geomagneticComponent
=
[
1824.141845703125
,
116.58167266845703
,
56727.7734375
,
88.15447235107422
,
3.6568238735198975
,
1827.8634033203125
,
56757.21484375
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NaN
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest030 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test030 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -929,17 +946,17 @@ describe("SensorJsTest", function () {
})
/**
* @tc.number:
Geomagentic_Sensor_Test
0310
* @tc.name: SensorGeomagenticTest031
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0310
* @tc.name: SensorGeomagentic
AlgorithmJS
Test031
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0310
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0310---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0310
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0310
------------------
'
);
let
geomagneticComponent
=
[
14425.57421875
,
-
17156.767578125
,
-
52023.21484375
,
-
66.69005584716797
,
-
49.94255447387695
,
22415.4375
,
56646.859375
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest031 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test031 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -957,16 +974,16 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0320
* @tc.name: SensorGeomagenticTest032
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0320
* @tc.name: SensorGeomagentic
AlgorithmJS
Test032
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0320
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0320---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0320
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0320
------------------
'
);
let
geomagneticComponent
=
[
NaN
,
NaN
,
NaN
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest032 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test032 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -978,15 +995,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0330
* @tc.name: SensorGeomagenticTest033
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0330
* @tc.name: SensorGeomagentic
AlgorithmJS
Test033
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0330
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0330---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0330
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0330
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest033 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test033 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -998,15 +1015,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0340
* @tc.name: SensorGeomagenticTest034
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0340
* @tc.name: SensorGeomagentic
AlgorithmJS
Test034
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0340
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0340---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0340
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0340
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest034 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test034 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1018,15 +1035,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0350
* @tc.name: SensorGeomagenticTest035
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0350
* @tc.name: SensorGeomagentic
AlgorithmJS
Test035
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0350
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0350---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0350
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0350
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest035 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test035 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1038,17 +1055,17 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0360
* @tc.name: SensorGeomagenticTest036
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0360
* @tc.name: SensorGeomagentic
AlgorithmJS
Test036
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0360
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0360---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0360
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0360
------------------
'
);
let
geomagneticComponent
=
[
27536.40234375
,
-
2248.586669921875
,
-
16022.4306640625
,
-
30.110872268676758
,
-
4.66834020614624
,
27628.05859375
,
31937.875
]
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MIN_VALUE
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest036 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test036 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1066,15 +1083,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0370
* @tc.name: SensorGeomagenticTest037
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0370
* @tc.name: SensorGeomagentic
AlgorithmJS
Test037
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0370
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0370---------
------------------start
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0370
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0370
------------------start
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest037 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test037 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1086,17 +1103,17 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0380
* @tc.name: SensorGeomagenticTest038
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0380
* @tc.name: SensorGeomagentic
AlgorithmJS
Test038
* @tc.desc:verify app info is not null
* @tc.type: FUNC
* @tc.require: Issue Number
*/
it
(
"
Geomagentic_Sensor_Test
0380
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0380---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0380
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0380
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest038 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test038 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1108,16 +1125,16 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0390
* @tc.name: SensorGeomagenticTest039
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0390
* @tc.name: SensorGeomagentic
AlgorithmJS
Test039
* @tc.desc:verify app info is not null
*/
it
(
'
Geomagentic_Sensor_Test
0390
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0390
'
,
0
,
async
function
(
done
)
{
for
(
var
i
=
0
;
i
<
timeMillis
.
length
;
i
++
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0390---------
------------------
'
);
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0390
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
80
,
'
longitude
'
:
0
,
'
altitude
'
:
0
},
timeMillis
[
i
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest039 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test039 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
);
...
...
@@ -1136,15 +1153,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0400
* @tc.name: SensorGeomagenticTest040
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0400
* @tc.name: SensorGeomagentic
AlgorithmJS
Test040
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0400
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0400---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0400
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0400
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest040 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test040 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1156,15 +1173,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0410
* @tc.name: SensorGeomagenticTest041
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0410
* @tc.name: SensorGeomagentic
AlgorithmJS
Test041
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0410
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0410---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0410
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0410
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest041 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test041 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1176,15 +1193,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0420
* @tc.name: SensorGeomagenticTest042
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0420
* @tc.name: SensorGeomagentic
AlgorithmJS
Test042
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0420
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0420 max ---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0420
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0420 max
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest042 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test042 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1196,15 +1213,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0430
* @tc.name: SensorGeomagenticTest043
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0430
* @tc.name: SensorGeomagentic
AlgorithmJS
Test043
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0430
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0430---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0430
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0430
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest043 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test043 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1216,15 +1233,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0440
* @tc.name: SensorGeomagenticTest044
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0440
* @tc.name: SensorGeomagentic
AlgorithmJS
Test044
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0440
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0440---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0440
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0440
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest044 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test044 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1236,19 +1253,19 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0450
* @tc.name: SensorGeomagenticTest045
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0450
* @tc.name: SensorGeomagentic
AlgorithmJS
Test045
* @tc.desc:verify app info is not null
*/
it
(
'
Geomagentic_Sensor_Test
0450
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0450---------
------------------
'
);
it
(
'
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0450
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0450
------------------
'
);
for
(
var
i
=
0
;
i
<
GEOMAGNETIC_COORDINATES
.
length
;
i
++
)
{
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
GEOMAGNETIC_COORDINATES
[
i
][
0
],
'
longitude
'
:
GEOMAGNETIC_COORDINATES
[
i
][
1
],
'
altitude
'
:
GEOMAGNETIC_COORDINATES
[
i
][
2
]
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest045 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test045 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1267,15 +1284,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0460
* @tc.name: SensorGeomagenticTest046
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0460
* @tc.name: SensorGeomagentic
AlgorithmJS
Test046
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0460
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0460---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0460
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0460
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
MAX_VALUE
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest046 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test046 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1287,15 +1304,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0470
* @tc.name: SensorGeomagenticTest047
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0470
* @tc.name: SensorGeomagentic
AlgorithmJS
Test047
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0470
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0470---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0470
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0470
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NaN
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest047 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test047 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1307,15 +1324,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0480
* @tc.name: SensorGeomagenticTest048
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0480
* @tc.name: SensorGeomagentic
AlgorithmJS
Test048
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0480
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0480---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0480
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0480
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
Number
.
NEGATIVE_INFINITY
,
'
altitude
'
:
0
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest048 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test048 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1327,15 +1344,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0490
* @tc.name: SensorGeomagenticTest049
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0490
* @tc.name: SensorGeomagentic
AlgorithmJS
Test049
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0490
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0490---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0490
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0490
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
MAX_VALUE
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest049 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test049 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1347,15 +1364,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0500
* @tc.name: SensorGeomagenticTest050
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0500
* @tc.name: SensorGeomagentic
AlgorithmJS
Test050
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0500
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0500---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0500
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0500
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NaN
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest050 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test050 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
@@ -1367,15 +1384,15 @@ describe("SensorJsTest", function () {
})
/*
* @tc.number:
Geomagentic_Sensor_Test
0510
* @tc.name: SensorGeomagenticTest051
* @tc.number:
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0510
* @tc.name: SensorGeomagentic
AlgorithmJS
Test051
* @tc.desc:verify app info is not null
*/
it
(
"
Geomagentic_Sensor_Test
0510
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
----Geomagentic_Sensor_Test0510---------
------------------
'
);
it
(
"
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_
0510
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
------------------
SUB_SensorsSystem_GeomagneticAlgorithm_JSTest_0510
------------------
'
);
await
sensor
.
getGeomagneticField
({
'
latitude
'
:
0
,
'
longitude
'
:
0
,
'
altitude
'
:
Number
.
NEGATIVE_INFINITY
},
timeMillis
[
0
]).
then
((
data
)
=>
{
console
.
info
(
'
SensorGeomagenticTest051 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
console
.
info
(
'
SensorGeomagentic
AlgorithmJS
Test051 x:
'
+
data
.
x
+
'
,y:
'
+
data
.
y
+
'
,z:
'
+
data
.
z
+
'
,geomagneticDip:
'
+
data
.
geomagneticDip
+
'
,deflectionAngle:
'
+
data
.
deflectionAngle
+
'
,levelIntensity:
'
+
data
.
levelIntensity
+
'
,totalIntensity:
'
+
data
.
totalIntensity
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录