Skip to content

Fix printing of SMT data structures in failed unit tests #7287

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
merged 1 commit into from
Nov 2, 2022

Conversation

thomasspriggs
Copy link
Contributor

The operator needed for the printing is defined in smt_to_smt2_string.cpp, but it needs to be forward declared for the catch framework to find and use it, instead of printing SMT data structures 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.

The operator needed for the printing is defined in
`smt_to_smt2_string.cpp`, but it needs to be forward declared for the
catch framework to find and use it, instead of printing SMT data
structures 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 marked this pull request as ready for review November 1, 2022 18:20
@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Base: 78.03% // Head: 78.04% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (c110dcf) compared to base (21e3260).
Patch coverage: 94.73% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7287   +/-   ##
========================================
  Coverage    78.03%   78.04%           
========================================
  Files         1624     1624           
  Lines       187405   187414    +9     
========================================
+ Hits        146249   146262   +13     
+ Misses       41156    41152    -4     
Impacted Files Coverage Δ
src/solvers/flattening/boolbv_width.cpp 73.80% <0.00%> (ø)
src/ansi-c/expr2c.cpp 67.35% <100.00%> (+0.03%) ⬆️
src/goto-programs/goto_clean_expr.cpp 99.02% <100.00%> (ø)
src/goto-programs/goto_convert_side_effect.cpp 94.50% <100.00%> (+0.02%) ⬆️
src/goto-symex/goto_symex.cpp 98.64% <100.00%> (ø)
...it/solvers/smt2_incremental/smt_to_smt2_string.cpp 100.00% <100.00%> (ø)
unit/catch/catch.hpp 42.91% <0.00%> (+0.04%) ⬆️
...rc/solvers/smt2_incremental/smt_to_smt2_string.cpp 96.73% <0.00%> (+1.08%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@thomasspriggs thomasspriggs merged commit 7b4b59a into diffblue:develop Nov 2, 2022
@thomasspriggs thomasspriggs deleted the tas/catch_smt branch November 2, 2022 11:30
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.

2 participants