Commit 1b776613 authored by Roque's avatar Roque

Improve tests

See merge request nexedi/erp5!1808
parents c09ec2e3 16f88948
......@@ -55,7 +55,8 @@
' );\n' +
'};\n' +
'me.onUpdate = function (timestamp) {\n' +
'var realDistance = distance(\n' +
' var current_position = me.getCurrentPosition(),\n' +
' realDistance = distance(\n' +
' me.initialPosition.x,\n' +
' me.initialPosition.y,\n' +
' me.getCurrentPosition().x,\n' +
......@@ -64,10 +65,11 @@
' expectedDistance = (me.getAirSpeed() * timestamp / 1000).toFixed(8);\n' +
' assert(timestamp, 1000 / 60, "Timestamp");\n' +
' assert(realDistance, expectedDistance, "Distance");\n' +
'compare(me.getCurrentPosition(), {\n' +
' x: me.initialPosition.x + 2.3992831666911723e-06,\n' +
' y: me.initialPosition.y,\n' +
' z: me.initialPosition.z\n' +
' current_position.x = current_position.x.toFixed(7);\n' +
' compare(current_position, {\n' +
' x: (me.initialPosition.x + 2.3992831666911723e-06).toFixed(7),\n' +
' y: me.initialPosition.y,\n' +
' z: me.initialPosition.z\n' +
'});\n' +
'me.exit(me.triggerParachute());\n' +
'};',
......
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1009.56051.15404.48947</string> </value>
<value> <string>1010.10600.362.51182</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1690898400.26</float>
<float>1690983490.56</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -68,7 +68,8 @@
'};\n' +
'\n' +
'me.onUpdate = function (timestamp) {\n' +
' var realDistance = distance(\n' +
' var current_position = me.getCurrentPosition(),\n' +
' realDistance = distance(\n' +
' me.initialPosition.x,\n' +
' me.initialPosition.y,\n' +
' me.getCurrentPosition().x,\n' +
......@@ -77,8 +78,9 @@
' expectedDistance = (me.getAirSpeed() * timestamp / 1000).toFixed(8);\n' +
' assert(timestamp, 1000 / 60, "Timestamp");\n' +
' assert(realDistance, expectedDistance, "Distance");\n' +
' compare(me.getCurrentPosition(), {\n' +
' x: me.initialPosition.x + 2.3992831666911723e-06,\n' +
' current_position.x = current_position.x.toFixed(7);\n' +
' compare(current_position, {\n' +
' x: (me.initialPosition.x + 2.3992831666911723e-06).toFixed(7),\n' +
' y: me.initialPosition.y,\n' +
' z: me.initialPosition.z\n' +
' });\n' +
......
......@@ -246,7 +246,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1010.3741.38295.37973</string> </value>
<value> <string>1010.10621.5765.11161</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -266,7 +266,7 @@
</tuple>
<state>
<tuple>
<float>1690898327.04</float>
<float>1690900659.22</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment