From ba8b5b69a535cf312e955d6ee76e1e80ad02bb28 Mon Sep 17 00:00:00 2001 From: hui1975 Date: Mon, 10 Apr 2023 13:07:53 +0000 Subject: [PATCH] update Signed-off-by: hui1975 Change-Id: Ia856b039501f8def17097f3ea08bde5ae39b27a1 --- .../src/main/js/test/SensorGeomagneticTest.test.js | 14 +++++++------- .../SensorOnOffTest.test_newSensorGeomagnetic.js | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sensors/sensor_standard/src/main/js/test/SensorGeomagneticTest.test.js b/sensors/sensor_standard/src/main/js/test/SensorGeomagneticTest.test.js index ea900386f..fe504a8ed 100644 --- a/sensors/sensor_standard/src/main/js/test/SensorGeomagneticTest.test.js +++ b/sensors/sensor_standard/src/main/js/test/SensorGeomagneticTest.test.js @@ -189,13 +189,13 @@ describe("SensorJsTest_sensor_2", function () { + ',geomagneticDip: ' + data.geomagneticDip + ',deflectionAngle: ' + data.deflectionAngle + ',levelIntensity: ' + data.levelIntensity + ',totalIntensity: ' + data.totalIntensity) - expect(Math.abs(data.x - geomagneticComponent[0]) < EPS).assertTrue() - expect(Math.abs(data.y - geomagneticComponent[1]) < EPS).assertTrue() - expect(Math.abs(data.z - geomagneticComponent[2]) < EPS).assertTrue() - expect(Math.abs(data.geomagneticDip - geomagneticComponent[3]) < EPS).assertTrue() - expect(Math.abs(data.deflectionAngle - geomagneticComponent[4]) < EPS).assertTrue() - expect(Math.abs(data.levelIntensity - geomagneticComponent[5]) < EPS).assertTrue() - expect(Math.abs(data.totalIntensity - geomagneticComponent[6]) < EPS).assertTrue() + expect(Math.abs(data.x - geomagneticComponent[0]) < EPS).assertTrue() + expect(Math.abs(data.y - geomagneticComponent[1]) < EPS).assertTrue() + expect(Math.abs(data.z - geomagneticComponent[2]) < EPS).assertTrue() + expect(Math.abs(data.geomagneticDip - geomagneticComponent[3]) < EPS).assertTrue() + expect(Math.abs(data.deflectionAngle - geomagneticComponent[4]) < EPS).assertTrue() + expect(Math.abs(data.levelIntensity - geomagneticComponent[5]) < EPS).assertTrue() + expect(Math.abs(data.totalIntensity - geomagneticComponent[6]) < EPS).assertTrue() } setTimeout(() => { done() diff --git a/sensors/sensor_standard/src/main/js/test/SensorOnOffTest.test_newSensorGeomagnetic.js b/sensors/sensor_standard/src/main/js/test/SensorOnOffTest.test_newSensorGeomagnetic.js index e11527920..51b54434e 100644 --- a/sensors/sensor_standard/src/main/js/test/SensorOnOffTest.test_newSensorGeomagnetic.js +++ b/sensors/sensor_standard/src/main/js/test/SensorOnOffTest.test_newSensorGeomagnetic.js @@ -229,13 +229,13 @@ describe("SensorJsTest_sensor_60", function () { } else { console.info('Sensor_GetGeomagneticInfo_005 x: ' + data.x + ',y: ' + data.y + ',z: ' + data.z + ',geomagneticDip: ' + data.geomagneticDip + ',deflectionAngle: ' + data.deflectionAngle + ',levelIntensity: ' + data.levelIntensity + ',totalIntensity: ' + data.totalIntensity) - expect(Math.abs(data.x - geomagneticComponent[0]) < EPS).assertTrue() - expect(Math.abs(data.y - geomagneticComponent[1]) < EPS).assertTrue() - expect(Math.abs(data.z - geomagneticComponent[2]) < EPS).assertTrue() - expect(Math.abs(data.geomagneticDip - geomagneticComponent[3]) < EPS).assertTrue() - expect(Math.abs(data.deflectionAngle - geomagneticComponent[4]) < EPS).assertTrue() - expect(Math.abs(data.levelIntensity - geomagneticComponent[5]) < EPS).assertTrue() - expect(Math.abs(data.totalIntensity - geomagneticComponent[6]) < EPS).assertTrue() + expect(Math.abs(data.x - geomagneticComponent[0]) < EPS).assertTrue() + expect(Math.abs(data.y - geomagneticComponent[1]) < EPS).assertTrue() + expect(Math.abs(data.z - geomagneticComponent[2]) < EPS).assertTrue() + expect(Math.abs(data.geomagneticDip - geomagneticComponent[3]) < EPS).assertTrue() + expect(Math.abs(data.deflectionAngle - geomagneticComponent[4]) < EPS).assertTrue() + expect(Math.abs(data.levelIntensity - geomagneticComponent[5]) < EPS).assertTrue() + expect(Math.abs(data.totalIntensity - geomagneticComponent[6]) < EPS).assertTrue() } setTimeout(() =>{ done() -- GitLab