forbid the use of std::endl on std::cerr
std::cerr will flush after each operator<< by default, so it's simpler to use \n instead of std::endl, especially if we can merge \n into the previous string. Ideally we should prefer \n for std::cout as well, but there are reasonable cases where we want to call std::endl there, so it's hard to enforce. * tests/sanity/style.test: Diagnose occurrences of cerr.*<<.*endl. * bin/autcross.cc, bin/autfilt.cc, bin/ltlcross.cc, bin/ltlsynt.cc, spot/tl/formula.cc, spot/twa/bdddict.cc, tests/core/checkpsl.cc, tests/core/checkta.cc, tests/core/consterm.cc, tests/core/emptchk.cc, tests/core/equalsf.cc, tests/core/ikwiad.cc, tests/core/kind.cc, tests/core/length.cc, tests/core/ltlrel.cc, tests/core/parity.cc, tests/core/randtgba.cc, tests/core/reduc.cc, tests/core/syntimpl.cc, tests/ltsmin/modelcheck.cc: Fix them.
This commit is contained in:
parent
b4cced9ba8
commit
09c93a3a3d
21 changed files with 148 additions and 170 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*_
|
||||
// Copyright (C) 2008-2012, 2014-2016, 2018 Laboratoire
|
||||
// Copyright (C) 2008-2012, 2014-2016, 2018-2019 Laboratoire
|
||||
// de Recherche et Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2004, 2006, 2007 Laboratoire d'Informatique de Paris
|
||||
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
static void
|
||||
syntax(char* prog)
|
||||
{
|
||||
std::cerr << prog << " option formula1 (formula2)?" << std::endl;
|
||||
std::cerr << prog << " option formula1 (formula2)?\n";
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ main(int argc, char** argv)
|
|||
fin = new std::ifstream(argv[2]);
|
||||
if (!*fin)
|
||||
{
|
||||
std::cerr << "Cannot open " << argv[2] << std::endl;
|
||||
std::cerr << "Cannot open " << argv[2] << '\n';
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
|
@ -196,7 +196,7 @@ main(int argc, char** argv)
|
|||
{
|
||||
if (readfile)
|
||||
{
|
||||
std::cerr << "Cannot read from file and check result." << std::endl;
|
||||
std::cerr << "Cannot read from file and check result.\n";
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
|
@ -232,7 +232,7 @@ main(int argc, char** argv)
|
|||
if (!simp->are_equivalent(input_f, maybe_larger))
|
||||
{
|
||||
std::cerr << "Incorrect reduction (reduce_size_strictly=0) from `"
|
||||
<< f1s_before << "' to `" << f1l << "'." << std::endl;
|
||||
<< f1s_before << "' to `" << f1l << "'.\n";
|
||||
exit_code = 3;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue