Type message definition parsers

This commit is contained in:
Marko Durkovic
2022-04-11 10:46:12 +02:00
parent 19f0678645
commit e88241074e
4 changed files with 335 additions and 140 deletions
+11
View File
@@ -140,6 +140,10 @@ module test_msgs {
d4 array;
};
};
struct Bar {
int i;
};
};
"""
@@ -273,6 +277,13 @@ def test_parse_idl() -> None:
assert fields[5][1][0] == Nodetype.SEQUENCE
assert fields[6][1][0] == Nodetype.ARRAY
assert 'test_msgs/Bar' in ret
consts, fields = ret['test_msgs/Bar']
assert consts == []
assert len(fields) == 1
assert fields[0][0] == 'i'
assert fields[0][1][1] == 'int'
def test_register_types() -> None:
"""Test type registeration."""