Skip to content

Add comprehensive tests for cuddSymmetry.c targeting 90% coverage#110

Merged
doganulus merged 4 commits into4.0.0from
copilot/complete-test-cases-src-cuddsymmetry
Dec 6, 2025
Merged

Add comprehensive tests for cuddSymmetry.c targeting 90% coverage#110
doganulus merged 4 commits into4.0.0from
copilot/complete-test-cases-src-cuddsymmetry

Conversation

Copy link
Copy Markdown

Copilot AI commented Dec 5, 2025

  • Analyze current test coverage for src/cuddSymmetry.c (was at 2.5%)
  • Understand the cuddSymmetry.c source code structure and functions
  • Build and run existing test suite to verify current state
  • Write comprehensive tests achieving 85.3% coverage targeting:
    • Cudd_SymmProfile function (with/without symmetries, partial ranges)
    • cuddSymmCheck function (symmetric pairs, non-symmetric, isolated projections, complemented edges)
    • cuddSymmSifting function (via CUDD_REORDER_SYMM_SIFT with various limits)
    • cuddSymmSiftingConv function (via CUDD_REORDER_SYMM_SIFT_CONV)
    • Static helper functions (ddSymmSiftingAux, ddSymmSiftingUp/Down, ddSymmGroupMove, ddSymmGroupMoveBackward, ddSymmSiftingBackward, ddSymmSummary)
    • Termination callback and time limit tests
    • Cudd_VarsAreSymmetric API tests
  • Run coverage report: 85.3% line coverage (551/646 lines)
  • Run code review and address feedback:
    • Updated documentation to reflect actual 85% coverage
    • Added meaningful assertion comparing nodesBefore and nodesAfter
    • Changed termination callback to conditionally terminate after iterations
    • Increased time limit from 1ms to 50ms for reliability
  • Run security checks (no issues found)

Note: The remaining ~15% uncovered code consists primarily of out-of-memory error handling paths that are difficult to trigger in unit tests without mocking memory allocation.

Original prompt

Complete test cases for src/cuddSymmetry.c and target 90% coverage for the source file.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: doganulus <1174212+doganulus@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test cases for src/cuddSymmetry.c to target 90% coverage Add comprehensive tests for cuddSymmetry.c targeting 90% coverage Dec 5, 2025
Copilot AI requested a review from doganulus December 5, 2025 19:38
@doganulus
Copy link
Copy Markdown
Member

@copilot Implement test cases

Copilot AI and others added 2 commits December 5, 2025 20:12
Co-authored-by: doganulus <1174212+doganulus@users.noreply.github.com>
…nd test reliability

Co-authored-by: doganulus <1174212+doganulus@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Dec 5, 2025

@copilot Implement test cases

Implemented comprehensive test cases for cuddSymmetry.c in commits e39057f and 1ad14cd. The tests achieve 85.3% line coverage (551/646 lines) and cover all 13 functions in the module including:

  • Cudd_SymmProfile, cuddSymmCheck, cuddSymmSifting, cuddSymmSiftingConv
  • Static helpers: ddSymmSiftingAux, ddSymmSiftingUp/Down, ddSymmGroupMove, ddSymmGroupMoveBackward, ddSymmSiftingBackward, ddSymmSummary
  • Termination callbacks, time limits, and edge cases

The remaining ~15% uncovered code consists primarily of out-of-memory error handling paths.

@doganulus doganulus marked this pull request as ready for review December 6, 2025 06:47
@doganulus doganulus merged commit de95825 into 4.0.0 Dec 6, 2025
38 of 74 checks passed
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