Fill test gaps in guesses_to_score, Scorer DP, and Guesses#120
Merged
Conversation
Add delta-boundary pairs for all four guesses_to_score thresholds — previously only the first threshold tested the +5 fuzz window. Add focused Scorer DP specs that exercise dominance pruning — two candidates at the same j and l, and a cheaper length-1 sequence that dominates a length-2 path at the same j. Add spatial_guesses unit tests (shift doubling, turn scaling, keypad vs qwerty), and new score_spec.rb and feedback_spec.rb covering Score and Feedback initialisation defaults and structural equality.
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.
Context
Several areas of the test suite have gaps that allow real bugs to go undetected:
guesses_to_scorehas delta-boundary pairs only at the first of four thresholds — removing the+ deltafuzz from any of the other three threshold lines passes the full suite.spatial_guesseshas no unit tests, andScoreandFeedbackhave no dedicated specs.Changes
n_004/n_005) for all fourguesses_to_scorethresholds.jandl, and a cheaper length-1 sequence that dominates a more expensive length-2 path at the samej.spatial_guessesunit tests covering shift doubling, turn scaling, and keypad vs qwerty graph stats.score_spec.rbandfeedback_spec.rbcovering initialisation defaults and structural equality forScoreandFeedback.Consequences
Mutations to the
guesses_to_scorethresholds, the DP dominance guard, and the spatial guess formula will now be caught by the suite.