3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-08 17:01:55 +00:00

Add comprehensive tests for API algebraic number functions (#7888)

- Created new test file api_algebraic.cpp with tests for all algebraic API functions
- Tests cover basic operations (add, sub, mul, div, power, root)
- Tests cover comparison operations (lt, le, gt, ge, eq, neq)
- Tests cover sign detection (is_zero, is_pos, is_neg, sign)
- Tests cover algebraic value detection (is_value)
- Added comprehensive test cases for rational numbers and fractions
- Updated main.cpp and CMakeLists.txt to include the new test module

Coverage improvements:
- src/api/api_algebraic.cpp: 0% -> 52% (136/258 lines covered)
- Overall project coverage: ~47% (gained 71 covered lines)

Co-authored-by: Daily Test Coverage Improver <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Don Syme 2025-09-16 23:32:23 +01:00 committed by GitHub
parent 6d3daa5338
commit 44d2bba3e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 199 additions and 0 deletions

View file

@ -15,6 +15,7 @@ add_executable(test-z3
algebraic_numbers.cpp
api_bug.cpp
api.cpp
api_algebraic.cpp
arith_rewriter.cpp
arith_simplifier_plugin.cpp
ast.cpp