Fix #773: Add bf_vs_ilp tests for all ILP reduction rules#778
Merged
Fix #773: Add bf_vs_ilp tests for all ILP reduction rules#778
Conversation
Every *_ilp.rs test file now has a test_*_to_ilp_bf_vs_ilp function that solves the source problem with BruteForce, solves the ILP reduction with ILPSolver, extracts the solution back, and asserts the two objective values match. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract shared `assert_bf_vs_ilp` helper into `test_helpers.rs` and refactor 44 bf_vs_ilp tests to use it, eliminating ~216 lines of duplicated solve-compare boilerplate. Clean up unused Solver imports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The bf_vs_ilp tests now own the BF-vs-ILP value comparison. Simplify MVC/MIS closed_loop tests to only assert structural properties (ilp_size, is_valid). Delete OLA optimization test that was fully subsumed by bf_vs_ilp. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #778 +/- ##
========================================
Coverage 97.85% 97.86%
========================================
Files 625 625
Lines 68311 68578 +267
========================================
+ Hits 66846 67113 +267
Misses 1465 1465 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_*_to_ilp_bf_vs_ilptests for all 85 ILP reduction rules (46 were missing)assert_bf_vs_ilphelper intest_helpers.rsto eliminate boilerplateTest plan
cargo test --features ilp bf_vs_ilp— 85 passedmake check— fmt, clippy, full test suite all greenCloses #773
🤖 Generated with Claude Code