21 |
|
|
22 |
|
|
23 |
import org.fenfire as ff |
import org.fenfire as ff |
24 |
from org.fenfire.fenmm import MindNet |
from org.fenfire.fenmm import MindNet, MMPlace |
25 |
|
|
26 |
def testMindNet(): |
def testMindNet(): |
27 |
""" |
""" |
32 |
|
|
33 |
a = ff.swamp.Nodes.N() |
a = ff.swamp.Nodes.N() |
34 |
b = ff.swamp.Nodes.N() |
b = ff.swamp.Nodes.N() |
|
c = ff.swamp.Nodes.N() |
|
35 |
|
|
36 |
net.put('a', a, 1) |
plA = MMPlace(1, 1, 1) |
37 |
net.put('b', b, 2) |
plB = MMPlace(2, 2, 2) |
38 |
net.put('b', c, 3) |
plC = MMPlace(3, 3, 3) |
39 |
|
|
40 |
|
net.put(a, plA, 1) |
41 |
|
net.put(b, plB, 2) |
42 |
|
net.put(b, plC, 3) |
43 |
|
|
44 |
print net.get('a'), net.get('a').depth, net.getDepth('a'), a |
assert net.get(a).depth == net.getDepth(a) == 1 |
45 |
print net.get('b'), net.get('b').object, net.getPlace('b'), c |
assert net.get(b).object == net.getPlace(b) == plC |
|
|
|
|
assert net.get('a').depth == net.getDepth('a') == 1 |
|
|
assert net.get('b').object == net.getPlace('b') == c |
|
46 |
|
|
47 |
def testMindNetLink(): |
def testMindNetLink(): |
48 |
""" |
""" |