Mercurial > hg > orthanc-stone
comparison Resources/CodeGeneration/stonegentool_test.py @ 474:38997ceb9bc6 bgo-commands-codegen
Ongoing work on message code generation
author | bgo-osimis |
---|---|
date | Wed, 13 Feb 2019 20:42:26 +0100 |
parents | 628941d63b8c |
children | f58fe38c8c04 |
comparison
equal
deleted
inserted
replaced
473:628941d63b8c | 474:38997ceb9bc6 |
---|---|
1 from stonegentool import EatToken,SplitListOfTypes,ParseTemplateType,LoadSchema,CheckSchemaSchema | 1 from stonegentool import \ |
2 EatToken,SplitListOfTypes,ParseTemplateType,LoadSchema,CheckSchemaSchema,ProcessSchema | |
2 import unittest | 3 import unittest |
3 import os | 4 import os |
4 | 5 |
5 class TestStonegentool(unittest.TestCase): | 6 class TestStonegentool(unittest.TestCase): |
6 def test_EatToken_empty(self): | 7 def test_EatToken_empty(self): |
83 def test_ParseSchema_bogus_schema(self): | 84 def test_ParseSchema_bogus_schema(self): |
84 fn = os.path.join(os.path.dirname(__file__), 'test', 'test1_bogus_schema.jsonc') | 85 fn = os.path.join(os.path.dirname(__file__), 'test', 'test1_bogus_schema.jsonc') |
85 obj = LoadSchema(fn) | 86 obj = LoadSchema(fn) |
86 self.assertRaises(Exception,CheckSchemaSchema,obj) | 87 self.assertRaises(Exception,CheckSchemaSchema,obj) |
87 | 88 |
89 def test_GenOrderQueue(self): | |
90 fn = os.path.join(os.path.dirname(__file__), 'test', 'test1.jsonc') | |
91 obj = LoadSchema(fn) | |
92 genOrderQueue,structTypes = ProcessSchema(obj) | |
93 print(f"genOrderQueue = {genOrderQueue}") | |
94 print("") | |
88 | 95 |
96 def test_GenerateTypeScriptEnumeration(self): | |
97 pass | |
89 | 98 |
99 def test_GenerateCppEnumeration(self): | |
100 pass | |
101 | |
102 def test_GenerateTypeScriptClasses(self): | |
103 pass | |
104 | |
105 def test_GenerateCppClasses(self): | |
106 pass | |
107 | |
108 def test_GenerateTypeScriptHandlerInterface(self): | |
109 pass | |
110 | |
111 def test_GenerateCppHandlerInterface(self): | |
112 pass | |
113 | |
114 def test_GenerateTypeScriptDispatcher(self): | |
115 pass | |
116 | |
117 def test_GenerateCppDispatcher(self): | |
118 pass | |
90 | 119 |
91 # def test(self): | 120 # def test(self): |
92 # s = 'hello world' | 121 # s = 'hello world' |
93 # self.assertEqual(s.split(), ['hello', 'world']) | 122 # self.assertEqual(s.split(), ['hello', 'world']) |
94 # # check that s.split fails when the separator is not a string | 123 # # check that s.split fails when the separator is not a string |
95 # with self.assertRaises(TypeError): | 124 # with self.assertRaises(TypeError): |
96 # s.split(2) | 125 # s.split(2) |
97 | 126 |
98 if __name__ == '__main__': | 127 if __name__ == '__main__': |
99 unittest.main() | 128 print("") |
129 unittest.main() |