Skip to content

Commit

Permalink
update utils
Browse files Browse the repository at this point in the history
  • Loading branch information
gouarin committed Jun 26, 2024
1 parent 6e68a2b commit 8a2e9c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
needs: [pre-commit, cppcheck]
runs-on: ubuntu-latest
strategy:
fail-fast: false
fail-fast: true
matrix:
include:
- cpp-version: gcc-9
Expand Down
12 changes: 8 additions & 4 deletions test/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ namespace scopi

if (!diff.empty())
{
std::cerr << "reference file: " << filenameRef << std::endl;
std::cerr << "output file: " << filenameResult << std::endl;
std::cerr << jsonResult << std::endl;
std::cerr << diff << std::endl;
for (const auto& p : diff)
{
const std::string path_ = p["path"];
Expand All @@ -39,6 +35,10 @@ namespace scopi
- static_cast<double>(jsonResult["objects"][path]));
if (error > tol)
{
std::cerr << "reference file: " << filenameRef << std::endl;
std::cerr << "output file: " << filenameResult << std::endl;
std::cerr << "differences: " << diff << std::endl;

std::cerr << "The entry " << path << " in objects is not the same." << std::endl;
std::cerr << "\tExpected: " << jsonRef["objects"][path] << std::endl;
std::cerr << "\tObtained: " << jsonResult["objects"][path] << std::endl;
Expand All @@ -49,6 +49,10 @@ namespace scopi
}
else
{
std::cerr << "reference file: " << filenameRef << std::endl;
std::cerr << "output file: " << filenameResult << std::endl;
std::cerr << "differences: " << diff << std::endl;

std::cerr << "The entry " << path << " in objects is not the same." << std::endl;
std::cerr << "\tExpected: " << jsonRef["objects"][path] << std::endl;
std::cerr << "\tObtained: " << jsonResult["objects"][path] << std::endl;
Expand Down

0 comments on commit 8a2e9c3

Please sign in to comment.