Skip to content
Snippets Groups Projects
Commit 06efd83f authored by Elias Pipping's avatar Elias Pipping
Browse files

Tests: Do not short-circuit on test failures

Highlight errors, too. Previously, they were hard to spot.
parent dac89531
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -71,7 +71,7 @@ struct GSTestSuite {
std::cout << "error for solver \"" << s << "\": " << normDiff
<< std::endl;
if (normDiff > tolerance) {
std::cerr << "Error too large for solver \"" << testCase << "\"."
std::cerr << "### Error too large for solver \"" << testCase << "\"."
<< std::endl;
return false;
}
......@@ -80,7 +80,7 @@ struct GSTestSuite {
auto test = [&](Step* step, std::string name) {
auto result = solve(step, 1e-12, 2000);
passed = passed and analyse(result, name, 1e-7);
passed &= analyse(result, name, 1e-7);
};
auto diffTest = [&](Step* step1, std::string name1, Step* step2,
......@@ -100,7 +100,6 @@ struct GSTestSuite {
<< ((maxDiff > 0.0)
? " up to " + Dune::formatString("%e", maxDiff)
: ".") << std::endl;
passed = passed and true;
};
{
......@@ -180,12 +179,12 @@ int main(int argc, char** argv) {
bool passed(true);
GSTestSuite<1> testsuite1;
passed = passed and checkWithStandardGrids(testsuite1);
passed &= checkWithStandardGrids(testsuite1);
std::cout << std::endl;
GSTestSuite<2> testsuite2;
passed = passed and checkWithStandardGrids(testsuite2);
passed &= checkWithStandardGrids(testsuite2);
return passed ? 0 : 1;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment