Skip to content

Fix irept printing in failed unit tests #6584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

thomasspriggs
Copy link
Contributor

The operator needed for the printing is defined in unit_tests.cpp, but it also needs to be forward declared for the catch framework to find and use it, instead of printing ireps as {?}.

A regression test of a failing unit test is included in this PR to ensure that this functionality for fault finding of failing unit tests works as intended.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Comment on lines 2 to 4

include ../../src/config.inc
include ../../src/common
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit picking: I don't think you actually need these here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@codecov
Copy link

codecov bot commented Jan 17, 2022

Codecov Report

Merging #6584 (724de82) into develop (907a214) will increase coverage by 0.28%.
The diff coverage is 99.07%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6584      +/-   ##
===========================================
+ Coverage    76.19%   76.48%   +0.28%     
===========================================
  Files         1578     1578              
  Lines       181276   181383     +107     
===========================================
+ Hits        138132   138734     +602     
+ Misses       43144    42649     -495     
Impacted Files Coverage Δ
unit/util/irep.cpp 99.48% <80.00%> (-0.52%) ⬇️
...ncremental/smt2_incremental_decision_procedure.cpp 93.20% <100.00%> (+3.28%) ⬆️
...ncremental/smt2_incremental_decision_procedure.cpp 96.78% <100.00%> (+1.23%) ⬆️
unit/catch/catch.hpp 42.77% <0.00%> (+10.44%) ⬆️
src/solvers/smt2_incremental/smt_responses.def 100.00% <0.00%> (+12.50%) ⬆️
unit/unit_tests.cpp 100.00% <0.00%> (+100.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 208ca7a...724de82. Read the comment docs.

The operator needed for the printing is defined in `unit_tests.cpp`, but
it needs to be forward declared for the catch framework to find and use
it, instead of printing ireps as `{?}`.

A regression test of a failing unit test is included in this PR to
ensure that this functionality for fault finding of failing unit tests
works as intended.
@thomasspriggs thomasspriggs force-pushed the tas/fix_irep_unit_test_printing branch from 68e687f to 724de82 Compare January 18, 2022 11:09
@thomasspriggs thomasspriggs merged commit 5cfbeb8 into diffblue:develop Jan 18, 2022
@thomasspriggs thomasspriggs deleted the tas/fix_irep_unit_test_printing branch January 18, 2022 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants