summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-09-25 15:09:21 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-09-25 15:09:21 +0200
commit0d4dac662b89bac9624337f851f448516a14f6fc (patch)
treea4fb66f3276ca570a7fa7758a928d64dac375d84 /test
parent35724ec75c281fc758963db69a1e112d53de687a (diff)
Transition: fix arg_to_param_map semantics
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_codegen.py4
-rwxr-xr-xtest/test_pta.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/test/test_codegen.py b/test/test_codegen.py
index e1bb942..e9b4067 100755
--- a/test/test_codegen.py
+++ b/test/test_codegen.py
@@ -42,7 +42,7 @@ example_json_1 = {
'destination' : 'IDLE',
'duration' : { 'static' : 120 },
'energy ' : { 'static' : 10000 },
- 'arg_to_param_map' : { 'txpower' : 0 },
+ 'arg_to_param_map' : { 0: 'txpower'},
'argument_values' : [ [10, 20, 30] ],
},
{
@@ -65,7 +65,7 @@ example_json_1 = {
'regression_args' : [3, 5],
},
},
- 'arg_to_param_map' : { 'txbytes' : 1 },
+ 'arg_to_param_map' : { 1: 'txbytes'},
'argument_values' : [ ['"foo"', '"hodor"'], [3, 5] ],
'argument_combination' : 'zip',
},
diff --git a/test/test_pta.py b/test/test_pta.py
index 4c727cc..c41f6a3 100755
--- a/test/test_pta.py
+++ b/test/test_pta.py
@@ -42,7 +42,7 @@ example_json_1 = {
'destination' : 'IDLE',
'duration' : { 'static' : 120 },
'energy ' : { 'static' : 10000 },
- 'arg_to_param_map' : { 'txpower' : 0 },
+ 'arg_to_param_map' : { 0: 'txpower'},
'argument_values' : [ [10, 20, 30] ],
},
{
@@ -65,7 +65,7 @@ example_json_1 = {
'regression_args' : [3, 5],
},
},
- 'arg_to_param_map' : { 'txbytes' : 1 },
+ 'arg_to_param_map' : { 1: 'txbytes'},
'argument_values' : [ ['"foo"', '"hodor"'], [3, 5] ],
'argument_combination' : 'zip',
},
@@ -499,7 +499,7 @@ class TestPTA(unittest.TestCase):
pta.add_state('TX', power = 100)
pta.add_transition('UNINITIALIZED', 'IDLE', 'init', energy = 500000, duration = 50000)
pta.add_transition('IDLE', 'IDLE', 'setTxPower', energy = 10000, duration = 120,
- arg_to_param_map = {'txpower' : 0})
+ arg_to_param_map = {0: 'txpower'})
pta.add_transition('IDLE', 'TX', 'send', energy = 3, duration = 10)
pta.add_transition('TX', 'IDLE', 'txComplete', timeout = 2000, is_interrupt = True)
trace = [