correct graphml output testing
This commit is contained in:
@@ -28,7 +28,6 @@ for t in $(ls tests/*.test); do
|
|||||||
fi
|
fi
|
||||||
if [ -f "tests/$num-output.graphml" ]
|
if [ -f "tests/$num-output.graphml" ]
|
||||||
then
|
then
|
||||||
# TODO: think about xmldiff here
|
|
||||||
diff "$t.graphml" "tests/$num-output.graphml"
|
diff "$t.graphml" "tests/$num-output.graphml"
|
||||||
if [ $? != 0 ]
|
if [ $? != 0 ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -31,20 +31,18 @@ int main(int argc, char** argv)
|
|||||||
Document d;
|
Document d;
|
||||||
|
|
||||||
StateMachine* sm = d.new_state_machine("SM");
|
StateMachine* sm = d.new_state_machine("SM");
|
||||||
|
State* parent = d.new_state(sm, "State");
|
||||||
d.new_initial(sm);
|
|
||||||
try {
|
try {
|
||||||
// check id uniqueness
|
// check id uniqueness
|
||||||
d.new_initial(sm, "n0");
|
d.new_initial(sm, "n0", "init name");
|
||||||
} catch (const Cyberiada::ParametersException&){
|
} catch (const Cyberiada::ParametersException&){
|
||||||
}
|
}
|
||||||
|
d.new_initial(sm);
|
||||||
try {
|
try {
|
||||||
// check non-empty name
|
// check non-empty name
|
||||||
d.new_initial(sm, "");
|
d.new_initial(sm, "");
|
||||||
} catch (const Cyberiada::ParametersException&){
|
} catch (const Cyberiada::ParametersException&){
|
||||||
}
|
}
|
||||||
|
|
||||||
State* parent = d.new_state(sm, "State");
|
|
||||||
d.new_initial(parent, "Local init");
|
d.new_initial(parent, "Local init");
|
||||||
try {
|
try {
|
||||||
// check double initial
|
// check double initial
|
||||||
|
|||||||
@@ -35,16 +35,16 @@ eventPropagation/ block
|
|||||||
</data>
|
</data>
|
||||||
</node>
|
</node>
|
||||||
<node id="n0">
|
<node id="n0">
|
||||||
<data key="dVertex">initial</data>
|
|
||||||
</node>
|
|
||||||
<node id="n1">
|
|
||||||
<data key="dName">State</data>
|
<data key="dName">State</data>
|
||||||
<graph id="n1:" edgedefault="directed">
|
<graph id="n0:" edgedefault="directed">
|
||||||
<node id="n1::n0">
|
<node id="n0::n0">
|
||||||
<data key="dVertex">initial</data>
|
<data key="dVertex">initial</data>
|
||||||
<data key="dName">Local init</data>
|
<data key="dName">Local init</data>
|
||||||
</node>
|
</node>
|
||||||
</graph>
|
</graph>
|
||||||
</node>
|
</node>
|
||||||
|
<node id="n1">
|
||||||
|
<data key="dVertex">initial</data>
|
||||||
|
</node>
|
||||||
</graph>
|
</graph>
|
||||||
</graphml>
|
</graphml>
|
||||||
@@ -1 +1 @@
|
|||||||
Document: {id: '', name: '', format: 'Cyberiada-GraphML-1.0', meta: {standard version: '1.0', transition order: transition first, event propagation: block events}, elements: {State Machine: {id: 'G0', name: 'SM', elements: {Initial: {id: 'n0'}, Composite State: {id: 'n1', name: 'State', elements: {Initial: {id: 'n1::n0', name: 'Local init'}}}}}}
|
Document: {id: '', name: '', format: 'Cyberiada-GraphML-1.0', meta: {standard version: '1.0', transition order: transition first, event propagation: block events}, elements: {State Machine: {id: 'G0', name: 'SM', elements: {Composite State: {id: 'n0', name: 'State', elements: {Initial: {id: 'n0::n0', name: 'Local init'}}}, Initial: {id: 'n1'}}}}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ exit();
|
|||||||
<data key="dData">EVENT [is_guard()]/
|
<data key="dData">EVENT [is_guard()]/
|
||||||
action();
|
action();
|
||||||
|
|
||||||
EVENT [is_guard() && is_second()]/
|
EVENT(b) [is_guard() && is_second()]/
|
||||||
action1();
|
action1();
|
||||||
action2();
|
action2();
|
||||||
|
|
||||||
Reference in New Issue
Block a user