Pin the instances in Reduce_Snapshot_Tests so a default-instance change can't break it
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
The test to change is redux-tests/Endpoints/Reduce_Snapshot_Tests.cs, which currently builds its input from each problem's default instance. Read it first to see how the inputs and snapshots are wired, and check the #690 map-back behaviour it guards for /reduce and /info. Replace the default lookup with fixed instances (for example via InlineData) and keep the snapshot assertions. Done means the test still passes after you change a problem's default instance, and it still fails if the map-back change leaks into /reduce or /info.
Written by the indexing model from the issue text.
Description
The reduction snapshot test (redux-tests/Endpoints/Reduce_Snapshot_Tests.cs, added in #749) builds its input from each problem's current default instance. So whenever a default changes, the snapshots no longer match and the test fails, even though the reduction code is fine. This happened when #957 changed the 3SAT and Vertex Cover defaults, and #959 had to refresh the snapshots.
Fix: give the test fixed instances, for example in InlineData, instead of reading the default. It keeps guarding what it was written for: the #690 map-back change must not leak into /reduce and /info. Changing a default then no longer breaks it.
Part of #938.
- Dominant language
- C#
- Stars
- 9
- Forks
- 34
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 41
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ReduxISU/Redux
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ReduxISU/Redux#1059 · 1 comment ·
Maintainers usually reply within 1 day
-
Weighted Cut and Independent Set brute force give wrong answers past 20 nodes (factorial overflow)Possibly taken @Trosper3 claimed this 9 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ReduxISU/Redux#1034 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug documentation queries
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ClickHouse/clickhouse-cs#815 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
XML grammar: only the closing --> of a comment gets the scope comment.block.xmlPossibly taken @alexeyfala claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
danipen/TextMateSharp#145 · 2 comments ·
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Klyroo/klyroo-dashboard#12 ·
Maintainers usually reply within 1 day
-
CONTRIBUTING rules Node out in step 0, then tells client-side contributors to run node --test, which is what CI gates onPossibly taken @yadavraj2001 claimed this today. Opendocumentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
juandresrodca/AdminForge#73 · 1 comment ·
Maintainers usually reply within 1 day