about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorFlorent Monjalet <florent.monjalet@gmail.com>2015-12-14 11:12:42 +0100
committerFlorent Monjalet <florent.monjalet@gmail.com>2016-01-18 14:02:32 +0100
commit0379f8e91fa54fe641948f01bb98a76fab47033a (patch)
treecac94e8c737c1ebbecdc2e87c8252682ba242029 /test
parente9ab0bd0f9c6dde642904cb473d57de9c81747b5 (diff)
downloadmiasm-0379f8e91fa54fe641948f01bb98a76fab47033a.tar.gz
miasm-0379f8e91fa54fe641948f01bb98a76fab47033a.zip
Types: adding the ("field", SomeMemType) syntax
Shorthand for ("field", SomeMemStruct.get_type()) in a Struct or
MemStruct fields definition.
Diffstat (limited to 'test')
-rw-r--r--test/core/types.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/core/types.py b/test/core/types.py
index 96765fe7..c59a68d6 100644
--- a/test/core/types.py
+++ b/test/core/types.py
@@ -256,7 +256,8 @@ class InStruct(MemStruct):
 class ContStruct(MemStruct):
     fields = [
         ("one", Num("B")),
-        ("instruct", InStruct.get_type()),
+        # Shorthand for: ("instruct", InStruct.get_type()),
+        ("instruct", InStruct),
         ("last", Num("B")),
     ]
 
@@ -290,7 +291,7 @@ class UniStruct(MemStruct):
     fields = [
         ("one", Num("B")),
         ("union", Union([
-            ("instruct", InStruct.get_type()),
+            ("instruct", InStruct),
             ("i", Num(">I")),
         ])),
         ("last", Num("B")),