aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen/test_vppapigen.py
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2020-08-10 17:06:44 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-11 14:55:41 +0000
commit68ebcd50bfb9eee419b3efabfde3411550160d03 (patch)
tree506a894cbc527f6075be9ef3bac4b3bb00dae97e /src/tools/vppapigen/test_vppapigen.py
parent710fe104620683755de71e2bb5d97c438987df74 (diff)
vppapigen: add support for empty options
Type: improvement Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I59323447bee7bb4f0563251a5df80cbefb9bd89e Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/tools/vppapigen/test_vppapigen.py')
-rwxr-xr-xsrc/tools/vppapigen/test_vppapigen.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/vppapigen/test_vppapigen.py b/src/tools/vppapigen/test_vppapigen.py
index a8e52637d48..999addfccd2 100755
--- a/src/tools/vppapigen/test_vppapigen.py
+++ b/src/tools/vppapigen/test_vppapigen.py
@@ -124,6 +124,16 @@ class TestDefine(unittest.TestCase):
with self.assertRaises(ParseError):
self.parser.parse_string(test_string)
+ def test_options(self):
+ test_string = '''
+ define foo { option deprecated; u8 foo; };
+ define foo_reply {u32 context; i32 retval; };
+ '''
+ r = self.parser.parse_string(test_string)
+ self.assertIsNotNone(r)
+ s = self.parser.process(r)
+ self.assertIsNotNone(s)
+
class TestService(unittest.TestCase):
@classmethod