problems
problems copied to clipboard
Update tests for wordle
What
Update tests for wordle to verify the program's behavior on words with repeating letters
Why
My first version of wordle (wordle_bug.c
) didn't correctly handle words with repeating letters:
The existing test didn't catch the problem but the test modified in this PR does:
The modified test also works OK on the correct version of the program (wordle_correct.c
):
Finally, the correct version of the program also works correctly with hardcoded grill
:
Notes
I am attaching all the files used for testing this PR in wordle_source.zip:
-
wordle_bug.c
- a version of the program with a bug. It passes the original test but fails the modified test -
wordle_bug_grill.c
- same aswordle_bug.c
but hardcodeschoice
togrill
-
wordle_correct.c
- a version of the program without the bug. It passes both original and modified test -
wordle_correct_grill.c
- same aswordle_correct.c
but hardcodeschoice
togrill