Skip to content

Conversation

Copy link

Copilot AI commented Dec 6, 2025

Adds test coverage for src/cuddZddMisc.c to exceed the 90% target (achieved 97.7%).

Coverage Results

  • Lines: 97.7% (42/43)
  • Functions: 100% (4/4)

The single uncovered line (221) is a NIL(DdNode) safety check unreachable through normal API usage.

Tests Added

  • Cudd_zddDagSize: constant nodes, single/multiple variables, unions, products, shared subnodes
  • Cudd_zddCountMinterm: empty ZDD, single variable, unions, varying path values
  • Cudd_zddPrintSubtable: empty manager, single variable, complex structures with both constant and non-constant children
  • Integration: combined DagSize/CountMinterm consistency, ZDDs from ISOP
TEST_CASE("cuddZddMisc - Cudd_zddDagSize basic tests", "[cuddZddMisc]") {
    SECTION("DagSize of single variable ZDD") {
        DdManager* manager = Cudd_Init(0, 4, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0);
        DdNode* z0 = Cudd_zddIthVar(manager, 0);
        Cudd_Ref(z0);
        
        int dagSize = Cudd_zddDagSize(z0);
        REQUIRE(dagSize >= 1);
        
        Cudd_RecursiveDerefZdd(manager, z0);
        Cudd_Quit(manager);
    }
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add test cases for src/cuddZddMisc.c to achieve 90% coverage Add comprehensive tests for cuddZddMisc.c achieving 97.7% line coverage Dec 6, 2025
Copilot AI requested a review from doganulus December 6, 2025 07:59
@doganulus doganulus marked this pull request as ready for review December 6, 2025 14:10
@doganulus doganulus merged commit 9d9d1d2 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