problems icon indicating copy to clipboard operation
problems copied to clipboard

Update tests for wordle

Open sryabkov opened this issue 10 months ago • 1 comments

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:

image

The existing test didn't catch the problem but the test modified in this PR does:

image

The modified test also works OK on the correct version of the program (wordle_correct.c):

image

Finally, the correct version of the program also works correctly with hardcoded grill:

image

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 as wordle_bug.c but hardcodes choice to grill
  • wordle_correct.c - a version of the program without the bug. It passes both original and modified test
  • wordle_correct_grill.c - same as wordle_correct.c but hardcodes choice to grill

sryabkov avatar Aug 27 '23 12:08 sryabkov