bin: abort autcross on input parse error
* bin/common_hoaread.hh (hoa_processor): Add a abort_on_error option. * bin/autcross.cc: Use it. * tests/core/autcross4.test: Add many more error cases to improve coverage.
This commit is contained in:
parent
faca835a5e
commit
1f9f3c77ea
4 changed files with 42 additions and 11 deletions
|
|
@ -542,7 +542,7 @@ namespace
|
|||
autcross_runner runner;
|
||||
public:
|
||||
autcross_processor()
|
||||
: hoa_processor(spot::make_bdd_dict()), runner(dict_)
|
||||
: hoa_processor(spot::make_bdd_dict(), true), runner(dict_)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -829,13 +829,13 @@ main(int argc, char** argv)
|
|||
if (int err = argp_parse(&ap, argc, argv, ARGP_NO_HELP, nullptr, nullptr))
|
||||
exit(err);
|
||||
|
||||
check_no_automaton();
|
||||
|
||||
auto s = tools.size();
|
||||
if (s == 0)
|
||||
error(2, 0, "No tool to run? Run '%s --help' for usage.",
|
||||
program_name);
|
||||
|
||||
check_no_automaton();
|
||||
|
||||
if (s == 1 && !opt_language_preserved && !no_checks)
|
||||
error(2, 0, "Since --language-preserved is not used, you need "
|
||||
"at least two tools to compare.");
|
||||
|
|
@ -845,8 +845,7 @@ main(int argc, char** argv)
|
|||
setup_sig_handler();
|
||||
|
||||
autcross_processor p;
|
||||
if (p.run())
|
||||
return 2;
|
||||
p.run();
|
||||
|
||||
if (round_num == 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue