diff options
| author | serpilliere <devnull@localhost> | 2014-06-03 10:27:56 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2014-06-03 10:27:56 +0200 |
| commit | ed5c3668cc9f545b52674ad699fc2b0ed1ccb575 (patch) | |
| tree | 07faf97d7e4d083173a1f7e1bfd249baed2d74f9 /test/core/graph.py | |
| parent | a183e1ebd525453710306695daa8c410fd0cb2af (diff) | |
| download | miasm-ed5c3668cc9f545b52674ad699fc2b0ed1ccb575.tar.gz miasm-ed5c3668cc9f545b52674ad699fc2b0ed1ccb575.zip | |
Miasm v2
* API has changed, so old scripts need updates * See example for API usage * Use tcc or llvm for jit emulation * Go to test and run test_all.py to check install Enjoy !
Diffstat (limited to 'test/core/graph.py')
| -rw-r--r-- | test/core/graph.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/core/graph.py b/test/core/graph.py new file mode 100644 index 00000000..a419a686 --- /dev/null +++ b/test/core/graph.py @@ -0,0 +1,18 @@ +from miasm2.core.graph import * + +g = DiGraph() +g.add_node('a') +g.add_node('b') + +g.add_edge('a', 'b') +g.add_edge('a', 'c') +g.add_edge('a', 'c') +g.add_edge('c', 'c') + +print g + +print [x for x in g.successors('a')] +print [x for x in g.predecessors('a')] +print [x for x in g.predecessors('b')] +print [x for x in g.predecessors('c')] +print [x for x in g.successors('c')] |