summaryrefslogtreecommitdiffstats
path: root/test/afb-test/tests/low-can_J1939Test.lua
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-11-12 14:44:02 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2020-01-09 14:40:41 +0100
commit9cc8fe590162ec91000f1d81dbfd888616afc6ab (patch)
tree0284f90c2da72dc8d2f2af2aeef5a8a7765e6716 /test/afb-test/tests/low-can_J1939Test.lua
parent7d9324e95abdb505a8f422251b751b3af2cbcff4 (diff)
test: Update tests with new transport
Bug-AGL: SPEC-2386 Change-Id: I3a0e4ea451f9e01fc13b7498b9eb20e81548ce5d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'test/afb-test/tests/low-can_J1939Test.lua')
-rw-r--r--test/afb-test/tests/low-can_J1939Test.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/afb-test/tests/low-can_J1939Test.lua b/test/afb-test/tests/low-can_J1939Test.lua
index fc7649f3..3e855366 100644
--- a/test/afb-test/tests/low-can_J1939Test.lua
+++ b/test/afb-test/tests/low-can_J1939Test.lua
@@ -47,7 +47,7 @@ end)
###########################################################
####################### J1939 TESTS #######################
###########################################################
-]]
+]]
print("\n##########################################")
print("######### BEGIN J1939 TESTS #########")
@@ -84,7 +84,7 @@ end)
+++++++++++
Tests write
+++++++++++
-]]
+]]
--print("\n++++++++++++++++++++++++++")
--print("++++ TESTS WRITE ++++")
@@ -94,23 +94,23 @@ _AFT.describe("Test write", function()
_AFT.testVerbStatusError("low-can_write_wo_auth", "low-can", "write", { signal_name = "Eng.Momentary.Overspeed.Enable", signal_value = 1})
_AFT.testVerbStatusSuccess("low-can_auth", "low-can", "auth", {})
_AFT.testVerbStatusSuccess("low-can_write_signal", "low-can", "write", { signal_name = "Eng.Momentary.Overspeed.Enable", signal_value = 1})
-_AFT.testVerbStatusSuccess("low-can_write_frame", "low-can", "write", { bus_name= "j1939", frame= { pgn= 62420, length=8, data= {1,2,3,4,5,6,7,8}}})
-_AFT.testVerbStatusSuccess("low-can_write_frame_other_pgn", "low-can", "write", { bus_name= "j1939", frame= { pgn= 126208, length=8, data= {9,10,11,12,13,14,15,16}}})
-_AFT.testVerbStatusError("low-can_write_frame_invalid_pgn", "low-can", "write", { bus_name= "j1939", frame= { pgn= 1234, length=8, data= {9,10,11,12,13,14,15,16}}})
-_AFT.testVerbStatusSuccess("low-can_write_multi_frame", "low-can", "write", { bus_name= "j1939", frame= { pgn= 126208, length=9, data= {9,10,11,12,13,14,15,16,17}}})
+_AFT.testVerbStatusSuccess("low-can_write_frame", "low-can", "write", { bus_name= "j1939", frame= { pgn= 62420, length=8, data= {1, 2, 3, 4, 5, 6, 7, 8}}})
+_AFT.testVerbStatusSuccess("low-can_write_frame_other_pgn", "low-can", "write", { bus_name= "j1939", frame= { pgn= 126208, length=8, data= {9, 10, 11, 12, 13, 14, 15, 16}}})
+_AFT.testVerbStatusError("low-can_write_frame_invalid_pgn", "low-can", "write", { bus_name= "j1939", frame= { pgn= 1234, length=8, data= {9, 10, 11, 12, 13, 14, 15, 16}}})
+_AFT.testVerbStatusSuccess("low-can_write_multi_frame", "low-can", "write", { bus_name= "j1939", frame= { pgn= 126208, length=9, data= {9, 10, 11, 12, 13, 14, 15, 16, 17}}})
end)
--[[
++++++++++
Tests read
++++++++++
-]]
+]]
local api = "low-can"
local evt = "messages.Eng.Momentary.Overspeed.Enable"
local evt2 = "messages.Actl.Eng.Prcnt.Trque.High.Resolution"
_AFT.describe("Test subscribe read frame", function()
- _AFT.addEventToMonitor(api .. "/" ..evt, function(eventname,data)
+ _AFT.addEventToMonitor(api .. "/" ..evt, function(eventname, data)
_AFT.assertEquals(eventname, api.."/"..evt)
end)
@@ -128,7 +128,7 @@ end)
------------------------------------------------------------------------------
_AFT.describe("Test subscribe not read all frame", function()
- _AFT.addEventToMonitor(api .. "/" ..evt2, function(eventname,data)
+ _AFT.addEventToMonitor(api .. "/" ..evt2, function(eventname, data)
_AFT.assertEquals(eventname, api.."/"..evt2)
end)
@@ -147,7 +147,7 @@ end)
---------------
_AFT.describe("Test subscribe read frame low time", function()
- _AFT.addEventToMonitor(api .. "/" ..evt, function(eventname,data)
+ _AFT.addEventToMonitor(api .. "/" ..evt, function(eventname, data)
_AFT.assertEquals(eventname, api.."/"..evt)
end)