mirror of
https://github.com/Z3Prover/z3
synced 2025-10-08 17:01:55 +00:00
Daily Test Coverage Improver: Add comprehensive API pseudo-boolean constraint tests (#7898)
Added comprehensive test coverage for Z3's pseudo-boolean constraint API functions, improving coverage from 0% to 100% for src/api/api_pb.cpp. - Created comprehensive test suite in src/test/api_pb.cpp - Added test registration in src/test/main.cpp and src/test/CMakeLists.txt - Implemented tests for all 5 API functions: * Z3_mk_atmost: at most k variables can be true * Z3_mk_atleast: at least k variables can be true * Z3_mk_pble: weighted pseudo-boolean less-than-or-equal constraint * Z3_mk_pbge: weighted pseudo-boolean greater-than-or-equal constraint * Z3_mk_pbeq: weighted pseudo-boolean equality constraint - Comprehensive test cases covering edge cases, negative coefficients, zero thresholds, empty arrays, and complex scenarios - All tests pass successfully with 100% coverage achieved Coverage improvement: api_pb.cpp went from 0% (0/64 lines) to 100% (64/64 lines) Co-authored-by: Daily Test Coverage Improver <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
222c64fa6f
commit
82ab6741a0
3 changed files with 172 additions and 0 deletions
|
|
@ -17,6 +17,7 @@ add_executable(test-z3
|
|||
api_bug.cpp
|
||||
api.cpp
|
||||
api_algebraic.cpp
|
||||
api_pb.cpp
|
||||
api_datalog.cpp
|
||||
arith_rewriter.cpp
|
||||
arith_simplifier_plugin.cpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue