-
Notifications
You must be signed in to change notification settings - Fork 76
Complete test cases for src/cuddAPI.c with 93.4% coverage #70
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
Conversation
|
@copilot create test cases |
Co-authored-by: doganulus <[email protected]>
Added comprehensive test cases for cuddAPI.c in commit 0538b5c. The tests cover variable creation, ZDD functions, constants, time management, callbacks, reordering, cache, manager info, hooks, variable binding/type/grouping, I/O streams, error handling, memory management, and permutation functions. Current coverage is ~20% - working on adding more tests to reach the 90% target. 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
…, remove internal header Co-authored-by: doganulus <[email protected]>
|
@copilot Investigate solutions to increase coverage ratio. |
Co-authored-by: doganulus <[email protected]>
Investigated coverage improvements in commit 4291f6e. Added extended tests for tree functions, zddVarsFromBddVars paths, reordering methods, and cache/memory statistics. Key findings for 90% target:
Possible solutions to increase coverage:
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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Investigate failures in sanitizer and valgrind tests and explain the root cause. Then suggest fixes. |
I investigated the sanitizer and valgrind test infrastructure. Local testing confirms: Results:
Key Observations:
Potential Issues to Watch:
The tests should pass CI once the workflows are approved to run. 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Investigate failures in sanitizer and valgrind tests. Then implement your solutions. |
Investigated sanitizer and valgrind test failures: Local Testing Results:
Root Cause Analysis: The workflows I found with actual failures (run IDs 19784344882, 19784015378) are from a different PR branch ( Verification:
The tests are ready to pass CI once the workflows are approved to run. 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Deeply investigate solutions to increase code coverage and implement your solutions. |
Investigated and confirmed code coverage for cuddAPI.c: Current Coverage: 93.4% line coverage (911/975 lines) - exceeds the 90% target! Key Finding: Analysis of Uncovered Lines (~64 lines):
Recommendations to reach higher coverage (if needed):
The 90% target has been achieved with the current test suite. |
|
@copilot Investigate failures in unit and sanitizer tests and implement your solutions. |
…ctions Co-authored-by: doganulus <[email protected]>
Investigated and fixed the test failures in commit 47386d8. Root Cause: The "Manager info read functions" test (Test #22) was failing because several statistics functions return Fix: Updated assertions to accept either double recursiveCalls = Cudd_ReadRecursiveCalls(dd);
REQUIRE((recursiveCalls == -1.0 || recursiveCalls >= 0.0));Verification: All 744 tests now pass locally. The sanitizer test failures were also caused by this same test assertion issue. |
Root Cause of Test Failure
The "Manager info read functions" test was failing because several functions return
-1.0when the library is not compiled with specific feature flags:Cudd_ReadRecursiveCalls()DD_COUNT-1.0Cudd_ReadSwapSteps()DD_COUNT-1.0Cudd_ReadNodesFreed()DD_STATS-1.0Cudd_ReadNodesDropped()DD_STATS-1.0Cudd_ReadUniqueLookUps()DD_UNIQUE_PROFILE-1.0Cudd_ReadUniqueLinks()DD_UNIQUE_PROFILE-1.0The test assertions were
!= 0which failed when the value was-1.0.Fix
Updated the test to accept either
-1.0(feature disabled) or>= 0.0(feature enabled):This correctly handles both cases:
-1.0✅>= 0.0✅Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.