ltltest: speedup more tests
This generalizes the previous patch. * src/ltltest/equalsf.cc: Allow escaped '\,' and negated result. * src/ltltest/Makefile.am: Use equalsf.cc for almost all tests that used equals.cc. (nequals): New. * src/ltltest/equals.test, src/ltltest/eventuniv.test, src/ltltest/lunabbrev.test, src/ltltest/nenoform.test, src/ltltest/parseerr.test, src/ltltest/tunabbrev.test, src/ltltest/tunenoform.test: Adjust.
This commit is contained in:
parent
7b9f695265
commit
6a741189bc
10 changed files with 371 additions and 324 deletions
|
|
@ -58,6 +58,11 @@ main(int argc, char** argv)
|
|||
if (argc != 2)
|
||||
syntax(argv[0]);
|
||||
std::ifstream input(argv[1]);
|
||||
if (!input)
|
||||
{
|
||||
std::cerr << "failed to open " << argv[1] << '\n';
|
||||
return 2;
|
||||
}
|
||||
|
||||
std::string s;
|
||||
unsigned line = 0;
|
||||
|
|
@ -72,7 +77,16 @@ main(int argc, char** argv)
|
|||
std::istringstream ss(s);
|
||||
std::string form;
|
||||
while (std::getline(ss, form, ','))
|
||||
formulas.push_back(form);
|
||||
{
|
||||
std::string tmp;
|
||||
while (form.size() > 0 && form.back() == '\\'
|
||||
&& std::getline(ss, tmp, ','))
|
||||
{
|
||||
form.back() = ',';
|
||||
form += tmp;
|
||||
}
|
||||
formulas.push_back(form);
|
||||
}
|
||||
}
|
||||
|
||||
unsigned size = formulas.size();
|
||||
|
|
@ -226,6 +240,9 @@ main(int argc, char** argv)
|
|||
exit_code = 1;
|
||||
}
|
||||
|
||||
#if NEGATE
|
||||
exit_code ^= 1;
|
||||
#endif
|
||||
if (exit_code)
|
||||
{
|
||||
spot::ltl::dump(std::cerr, f1) << std::endl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue