| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested. If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos. [no important files changed] For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you! |
Sorry, something went wrong.
There was a problem hiding this comment.
Please update the test cases to match the latest canonical-data.json rather than using assumed values, and remove the comments that were added since they aren't needed in the final solution. Also, don't forget to update test.toml using configlet (see #2959 for more information).
Sorry, something went wrong.
| public void testInvalidBoardOKeptPlayingAfterXWins() { | ||
|
|
||
| assertThatExceptionOfType(IllegalArgumentException.class) | ||
| .isThrownBy(() -> stateOfTicTacToe.determineState(new String[]{"XXX", "OO ", "O "})) |
There was a problem hiding this comment.
Please update the test values to match those in the canonical-data.json
Sorry, something went wrong.
| public void testInvalidBoardXKeptPlayingAfterOWins() { | ||
|
|
||
| assertThatExceptionOfType(IllegalArgumentException.class) | ||
| .isThrownBy(() -> stateOfTicTacToe.determineState(new String[]{"OOO", "XX ", "XX "})) |
There was a problem hiding this comment.
Sorry, something went wrong.
| // --- NAYE CHECKS START --- | ||
| // Agar X jeeta hai, toh xCount zaroor (oCount + 1) hona chahiye. Agar barabar hai, matlab O ne extra move chala! |
There was a problem hiding this comment.
| // --- NAYE CHECKS START --- | |
| // Agar X jeeta hai, toh xCount zaroor (oCount + 1) hona chahiye. Agar barabar hai, matlab O ne extra move chala! |
Sorry, something went wrong.
| ); | ||
| } | ||
|
|
||
| // Agar O jeeta hai, toh xCount zaroor oCount ke barabar hona chahiye. Agar xCount zyaada hai, matlab X ne extra move chala! |
There was a problem hiding this comment.
| // Agar O jeeta hai, toh xCount zaroor oCount ke barabar hona chahiye. Agar xCount zyaada hai, matlab X ne extra move chala! |
Sorry, something went wrong.
| "Impossible board: game should have ended after the game was won" | ||
| ); | ||
| } | ||
| // --- NAYE CHECKS END --- |
There was a problem hiding this comment.
| // --- NAYE CHECKS END --- |
Sorry, something went wrong.
|
Hi @jagdish-15 , I have updated StateOfTicTacToeTest.java to align with canonical-data.json and cleaned up the comments in StateOfTicTacToe.java. All tests are passing locally. Could you please take another look? |
Sorry, something went wrong.
|
Thanks for the updates! The test cases and reference solution look good now. The only remaining thing is to update test.toml using configlet. Please refer to the instructions in #2959: #2959 (comment). Once that's done, this should be good to go. |
Sorry, something went wrong.
|
hey! @jagdish-15 please check the new changes! sync tests.toml using configlet |
Sorry, something went wrong.
|
Looks like the CI Checkstyle check is unhappy |
Sorry, something went wrong.
|
@jagdish-15 please check again! |
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
| package exercises.practice.state_of_tic_tac_toe; // Apne project ke according package line rehne dena agar lagi ho | ||
|
|
There was a problem hiding this comment.
| package exercises.practice.state_of_tic_tac_toe; // Apne project ke according package line rehne dena agar lagi ho |
Could you please remove this
Sorry, something went wrong.
|
@jagdish-15 really sorry for bad code and comments, please check ! |
Sorry, something went wrong.
| ).isEqualTo(GameState.WIN); | ||
| } | ||
|
|
||
| @Disabled("Remove to run test") |
There was a problem hiding this comment.
Please don't remove these from any of the tests, including the import statement.
Sorry, something went wrong.
…va/StateOfTicTacToe.java Co-authored-by: Jagdish Prajapati <jagadishdrp@gmail.com>
…va/StateOfTicTacToe.java Co-authored-by: Jagdish Prajapati <jagadishdrp@gmail.com>
…icTacToeTest.java Co-authored-by: Jagdish Prajapati <jagadishdrp@gmail.com>
| Back | FazBrowse Home | New Git URL |
Summary of Changes(For Issue #3150 )
This PR implements missing canonical test cases for state-of-tic-tac-toe from problem-specifications:
Testing
Ran ./gradlew test locally — all 29 tests completed successfully with 0 failures.
Closes #3150