summaryrefslogtreecommitdiff
path: root/src/scripts/pyolian/test_eolian.py
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2018-03-01 16:35:22 +0100
committerDave Andreoli <dave@gurumeditation.it>2018-03-01 16:35:22 +0100
commit20f7d6f35fe5a9633451857bb2c79eb7dedbfc57 (patch)
treee8b8a4f3569f3fdbcd61440b0d08bb10bbcc98dd /src/scripts/pyolian/test_eolian.py
parent0a51dbf2ff20dbff7669a75704389e0a92d9b187 (diff)
Pyolian: new variable lookup APIs
with adjusted tests
Diffstat (limited to 'src/scripts/pyolian/test_eolian.py')
-rwxr-xr-xsrc/scripts/pyolian/test_eolian.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py
index 25615993df..13c7b2aaf0 100755
--- a/src/scripts/pyolian/test_eolian.py
+++ b/src/scripts/pyolian/test_eolian.py
@@ -139,19 +139,19 @@ class TestEolianUnit(unittest.TestCase):
139 self.assertGreater(all_count, 10) 139 self.assertGreater(all_count, 10)
140 140
141 def test_variable_listing(self): 141 def test_variable_listing(self):
142 l = list(eolian_db.variable_all_constants) 142 l = list(eolian_db.constants)
143 self.assertGreater(len(l), 2) 143 self.assertGreater(len(l), 2)
144 self.assertIsInstance(l[0], eolian.Variable) 144 self.assertIsInstance(l[0], eolian.Variable)
145 145
146 l = list(eolian_db.variable_all_globals) 146 l = list(eolian_db.globals)
147 self.assertGreater(len(l), 20) 147 self.assertGreater(len(l), 20)
148 self.assertIsInstance(l[0], eolian.Variable) 148 self.assertIsInstance(l[0], eolian.Variable)
149 149
150 l = list(eolian_db.variable_constants_get_by_file('efl_gfx_stack.eo')) 150 l = list(eolian_db.constants_by_file_get('efl_gfx_stack.eo'))
151 self.assertGreater(len(l), 1) 151 self.assertGreater(len(l), 1)
152 self.assertIsInstance(l[0], eolian.Variable) 152 self.assertIsInstance(l[0], eolian.Variable)
153 153
154 l = list(eolian_db.variable_globals_get_by_file('efl_net_http_types.eot')) 154 l = list(eolian_db.globals_by_file_get('efl_net_http_types.eot'))
155 self.assertGreater(len(l), 10) 155 self.assertGreater(len(l), 10)
156 self.assertIsInstance(l[0], eolian.Variable) 156 self.assertIsInstance(l[0], eolian.Variable)
157 157
@@ -393,7 +393,7 @@ class TestEolianDocumentation(unittest.TestCase):
393 393
394class TestEolianVariable(unittest.TestCase): 394class TestEolianVariable(unittest.TestCase):
395 def test_variable_global(self): 395 def test_variable_global(self):
396 var = eolian_db.variable_global_get_by_name('Efl.Net.Http.Error.BAD_CONTENT_ENCODING') 396 var = eolian_db.global_by_name_get('Efl.Net.Http.Error.BAD_CONTENT_ENCODING')
397 self.assertIsInstance(var, eolian.Variable) 397 self.assertIsInstance(var, eolian.Variable)
398 self.assertEqual(var.full_name, 'Efl.Net.Http.Error.BAD_CONTENT_ENCODING') 398 self.assertEqual(var.full_name, 'Efl.Net.Http.Error.BAD_CONTENT_ENCODING')
399 self.assertEqual(var.name, 'BAD_CONTENT_ENCODING') 399 self.assertEqual(var.name, 'BAD_CONTENT_ENCODING')
@@ -406,7 +406,7 @@ class TestEolianVariable(unittest.TestCase):
406 self.assertIsNone(var.value) # TODO is None correct here? no value? 406 self.assertIsNone(var.value) # TODO is None correct here? no value?
407 407
408 def test_variable_constant(self): 408 def test_variable_constant(self):
409 var = eolian_db.variable_constant_get_by_name('Efl.Gfx.Size.Hint.Fill') 409 var = eolian_db.constant_by_name_get('Efl.Gfx.Size.Hint.Fill')
410 self.assertIsInstance(var, eolian.Variable) 410 self.assertIsInstance(var, eolian.Variable)
411 self.assertEqual(var.full_name, 'Efl.Gfx.Size.Hint.Fill') 411 self.assertEqual(var.full_name, 'Efl.Gfx.Size.Hint.Fill')
412 self.assertEqual(var.name, 'Fill') 412 self.assertEqual(var.name, 'Fill')
@@ -575,7 +575,7 @@ class TestEolianExpression(unittest.TestCase):
575 self.assertEqual(exp.serialize, '100') 575 self.assertEqual(exp.serialize, '100')
576 576
577 def test_expression_unary(self): 577 def test_expression_unary(self):
578 var = eolian_db.variable_constant_get_by_name('Efl.Gfx.Size.Hint.Fill') 578 var = eolian_db.constant_by_name_get('Efl.Gfx.Size.Hint.Fill')
579 exp = var.value 579 exp = var.value
580 self.assertIsInstance(exp, eolian.Expression) 580 self.assertIsInstance(exp, eolian.Expression)
581 self.assertEqual(exp.type, eolian.Eolian_Expression_Type.UNARY) 581 self.assertEqual(exp.type, eolian.Eolian_Expression_Type.UNARY)