Commit a31ab32b authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* src/evtgbaalgos/save.cc (save_bfs::output_acc_set): Sort

acceptance conditions in the output.
* src/evtgbatest/readsave.test, src/evtgbatest/product.test: Adjust.
parent 6c1152d8
2004-11-05 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/evtgbaalgos/save.cc (save_bfs::output_acc_set): Sort
acceptance conditions in the output.
* src/evtgbatest/readsave.test, src/evtgbatest/product.test: Adjust.
* src/tgbaalgos/rundotdec.cc (tgba_run_dotty_decorator::link_decl):
Typo.
......
......@@ -79,10 +79,14 @@ namespace spot
void
output_acc_set(const symbol_set& ss) const
{
// Store all formated acceptance condition in a set to sort
// them in the output.
typedef std::set<std::string> acc_set;
acc_set acc;
for (symbol_set::const_iterator i = ss.begin(); i != ss.end(); ++i)
os_ << " "
<< quote_unless_bare_word(automata_
->format_acceptance_condition(*i));
acc.insert(automata_->format_acceptance_condition(*i));
for (acc_set::const_iterator i = acc.begin(); i != acc.end(); ++i)
os_ << " " << quote_unless_bare_word(*i);
}
};
......
......@@ -49,10 +49,8 @@ EOF
run 0 ./product input1 input2 input3 >stdout
perl -pi -e 's/Acc2 Acc1/Acc1 Acc2/g;' stdout
cat >expected <<\EOF
acc = Acc3 Acc1 Acc2;
acc = Acc1 Acc2 Acc3;
init = "<s1, t1, u1>" "<s1, t1, u2>";
"<s1, t1, u1>", "<s2, t2, u1>", a,;
"<s1, t1, u2>", "<s2, t2, u2>", a,;
......
......@@ -43,17 +43,11 @@ s2, "state 3", "\"he\\llo\"", c;
"state 3", s1, e4,;
EOF
# Sort out some possible inversions in the output.
# (The order is not guaranteed by SPOT.)
sed 's/d c/c d/g' stdout > tmp_ && mv tmp_ stdout
diff stdout expected
mv stdout input
run 0 ./readsave input > stdout
sed 's/d c/c d/g' stdout > tmp_ && mv tmp_ stdout
diff input stdout
rm input stdout expected
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment