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

print_hoa: diagnose unknown options

* src/twaalgos/hoa.cc: Here.
* src/tests/readsave.test: Test it.
* NEWS: Mention it.
* src/twaalgos/dot.cc, src/twaalgos/neverclaim.cc: Fix the
error message.
parent 5cd8c1b8
......@@ -3,6 +3,8 @@ New in spot 1.99.2a (not yet released)
* Bugs fixed
- Some acceptance conditions like Fin(0)|Fin(1)|Fin(2)&Inf(3)
where not detected as generalized-Rabin.
- Unknown arguments for print_hoa() (i.e., option -H in command-line
tools) are now diagnosed.
New in spot 1.99.2 (2015-07-18)
......
......@@ -696,3 +696,7 @@ State: 2
EOF
diff output3 expect3
$autfilt -Hk input 2>stderr && exit 1
grep 'print_hoa.*k' stderr
......@@ -173,7 +173,7 @@ namespace spot
break;
default:
throw std::runtime_error
(std::string("unknown option for dotty(): ") + c);
(std::string("unknown option for print_dot(): ") + c);
}
}
......
......@@ -247,7 +247,7 @@ namespace spot
if (opt)
while (*opt)
{
switch (*opt++)
switch (char c = *opt++)
{
case 'i':
implicit_labels = true;
......@@ -264,6 +264,9 @@ namespace spot
case 't':
acceptance = Hoa_Acceptance_Transitions;
break;
default:
throw std::runtime_error
(std::string("unknown option for print_hoa(): ") + c);
}
}
......
......@@ -61,7 +61,8 @@ namespace spot
break;
default:
throw std::runtime_error
(std::string("unknown option for never_claim(): ") + c);
(std::string("unknown option for print_never_claim(): ")
+ c);
}
}
......
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