Commit 6505200
Verify both local search and optimal paths in CapacityWithGroupPresenceSpecBuilderTest
Summary:
This simplifies `CapacityWithGroupPresenceSpecBuilderTest` and makes it check both solver paths wherever it makes sense.
Before, most tests only built the local-search spec builder, so the optimal-solver path (and its real LP expressions) went unchecked. We fold both paths into `VERIFY_CONSTRAINT_COMPONENTS_AND_GOAL_VALUES`, which now builds the local-search and optimal-solver builders from the `spec` and checks each. This drops the per-test builder/goal plumbing and the component-count switches. The main macro just delegates to `VERIFY_LOCAL_SEARCH_PATH` and `VERIFY_OPTIMAL_SOLVER_PATH`, so a test that only makes sense for one path (e.g. `AlwaysPresentHonorsMinPresence`) can call that one directly.
We also switch the comments (and the `AlwaysPresentHonors*` test name) from using the term `floor` to `minPresence`; "floor" was unclear.
**No existing assertions changed**; this only refactors and adds the optimal-path checks.
Reviewed By: yangneu2015
Differential Revision: D113018812
fbshipit-source-id: ec10661fe5b665691d6686532b63c271482cd5211 parent d383852 commit 6505200
1 file changed
Lines changed: 336 additions & 578 deletions
File tree
- algopt/rebalancer/materializer/spec_builder/tests
0 commit comments