bin: teach conversion options to report about the options

* bin/common_conv.cc, bin/common_conv.hh: Here.
* bin/autfilt.cc, bin/common_trans.cc, bin/ltlcross.cc, bin/ltldo.cc,
bin/ltlfilt.cc, bin/ltlgrind.cc, bin/randaut.cc, bin/randltl.cc: Pass
the name of the argumennt to the conversion function.
* tests/core/ltlcross3.test, tests/core/ltldo.test,
tests/core/randaut.test: Add test cases.
This commit is contained in:
Alexandre Duret-Lutz 2018-05-21 14:59:38 +02:00
parent 1f9f3c77ea
commit c369f899a3
13 changed files with 67 additions and 54 deletions

View file

@ -448,7 +448,7 @@ parse_opt(int key, char* arg, struct argp_state*)
csv_output = arg ? arg : "-";
break;
case OPT_DENSITY:
density = to_probability(arg);
density = to_probability(arg, "---density");
break;
case OPT_DUPS:
allow_dups = true;
@ -472,7 +472,7 @@ parse_opt(int key, char* arg, struct argp_state*)
products_avg = false;
++arg;
}
products = to_pos_int(arg);
products = to_pos_int(arg, "--products");
if (products == 0)
products_avg = false;
break;
@ -490,10 +490,10 @@ parse_opt(int key, char* arg, struct argp_state*)
tools_push_trans(arg, true);
break;
case OPT_SEED:
seed = to_pos_int(arg);
seed = to_pos_int(arg, "--seed");
break;
case OPT_STATES:
states = to_pos_int(arg);
states = to_pos_int(arg, "--states");
break;
case OPT_STOP_ERR:
stop_on_error = true;