initial & final vertexes in the doc interface + tests
This commit is contained in:
@@ -33,7 +33,17 @@ int main(int argc, char** argv)
|
||||
StateMachine* sm = d.new_state_machine("SM");
|
||||
|
||||
State* parent1 = d.new_state(sm, "Parent 0");
|
||||
d.new_state(parent1, "State 0-0");
|
||||
|
||||
try {
|
||||
// check id uniqueness
|
||||
d.new_state(sm, "n0", "test");
|
||||
} catch (const Cyberiada::ParametersException&){
|
||||
}
|
||||
|
||||
CYB_ASSERT(parent1->is_simple_state());
|
||||
d.new_state(parent1, "State 0-0");
|
||||
CYB_ASSERT(parent1->is_composite_state());
|
||||
|
||||
State* subparent = d.new_state(parent1, "Subparent 0-1");
|
||||
d.new_state(subparent, "State 0-1-0");
|
||||
d.new_state(subparent, "State 0-1-1");
|
||||
@@ -41,6 +51,12 @@ int main(int argc, char** argv)
|
||||
State* parent2 = d.new_state(sm, "Parent 1");
|
||||
d.new_state(parent2, "State 1-0");
|
||||
d.new_state(parent2, "State 1-1");
|
||||
try {
|
||||
// check id uniqueness on the deep level
|
||||
d.new_state(parent2, "n1::n1", "test");
|
||||
} catch (const Cyberiada::ParametersException&){
|
||||
}
|
||||
|
||||
try {
|
||||
cout << d << endl;
|
||||
d.save(string(argv[0]) + ".graphml", formatCyberiada10);
|
||||
|
||||
Reference in New Issue
Block a user