Repository navigation
zebra-puzzle: expand guidance with decision table and verify test sui… - #90
Open
utkarsh21022009-boop wants to merge 1 commit into
Open
utkarsh21022009-boop wants to merge 1 commit into
utkarsh21022009-boop wants to merge 1 commit into
Conversation
4 tasks
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.
…te (R58-T010)
Pull Request
Pull Request
R58-T010: zebra-puzzle: expand guidance with decision table and verify test suite
Description
Expands the guidance for the
zebra-puzzlepractice exercise around the canonical JUnit 5 test cases (@Test @DisplayName("resident who drinks water")and@Test @DisplayName("resident who owns zebra")) for Task R58-T010. Formulates a complete deductive breakdown demonstrating how both expected outcomes follow inexorably from the 15 specification statements. Establishes a comprehensive decision table linking input queries and constraints to required outcomes, and provides an explicit statement distinguishing specified contract behavior from inputs outside the exercise contract (e.g., query methods for unspecified attributes, dynamic rules, and extraneous exception rules). Implements an automated verification check using Pythonsubprocessand isolated scratch directories to validate real metadata, reject negative fixtures, verify reference execution (2 executed, 2 passed), run a standalone contract probe, verify failure-mode propagation, and protect unsolved working-tree learner starter files (UnsupportedOperationExceptionand SHA-256 integrity preserved).Related Issue
Fixes: #10
Type of Change
Changes Made
exercises/practice/zebra-puzzle/.docs/hints.md:@DisplayNamecase and method invocation (getWaterDrinker(),getZebraOwner()) to its required outcome.docs/maintenance/zebra-puzzle.md:tests.tomlUUIDs and@DisplayNameannotations).build/,.gradle/).work/R58-T010/ZebraPuzzleContractProbe.java:ZebraPuzzleinvariants: water drinker equals"Norwegian", zebra owner equals"Japanese", invocation order independence, idempotence on repeated calls, and strict String return typing.tools/course_checks/r58-t010.py:work/R58-T010/check.py.work/R58-T010/check.py:subprocessand isolated temporary scratch directories..meta/config.jsonand asserts path containment.@DisplayNameannotations againsttests.tomlandZebraPuzzleTest.java.ZebraPuzzleContractProbe.javaagainst compiled reference classes.getWaterDrinker()returning"Englishman") and empty test selection, asserting appropriate non-zero child exit codes and failure rejection.work/R58-T010/README.md:work/R58-T010/results.jsonandlatest-result.json:Screenshots / Recordings
Not applicable — no UI changes.
Testing
python3 work/R58-T010/check.pyandpython3 tools/course_checks/r58-t010.py.exercises/practice/zebra-puzzle.missing file.missing file.escapes exercise.16efb4e4-8ad7-4d5e-ba96-e5537b66fd42(resident who drinks water) verified present and asserting"Norwegian".084d5b8b-24e2-40e6-b008-c800da8cd257(resident who owns zebra) verified present and asserting"Japanese".--tests NoSuchZebraTestClass): correctly rejected with non-zero child exit and 0 executed tests.exercises/practice/zebra-puzzle/src/main/java/ZebraPuzzle.javaverified untouched and unsolved (UnsupportedOperationException).Checklist
Additional Notes
student/e26b07f0710/R58-T010(andR58-T010).S-AI-Projects/exercism-javaonmain.Reviewer Resources:
Track Policies
Reviewer Resources:
Track Policies