Skip to content

Conversation

@mao-sz
Copy link
Contributor

@mao-sz mao-sz commented Jan 2, 2026

Because

The test case in question isn't actually for any randomness, that's only part of the implementation to test genericness. Due to the current test name, a lengthy clarifying comment is needed, but I still see students get confused by this and why they don't need to write any randomisation code themselves.

This PR

  • Renames genericness test more appropriately
  • Amends comment to account for new test name and intent

Issue

N/A

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project Contributing Guide
  • The title of this PR follows the location of change: brief description of change format, e.g. 01_helloWorld: Update test cases
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If this PR includes any changes that affect the solution of an exercise, I've also updated the solution in the /solutions folder

The test name implies it's testing that repeatString itself can repeat
randomly, hence the lengthy clarifying comment.

In actuality, the test is to ensure the function is generic. Randomness
isn't part of the "test case", only the test case's implementation.
@mao-sz mao-sz merged commit 3e34110 into TheOdinProject:main Jan 3, 2026
1 check passed
@mao-sz mao-sz deleted the test-name branch January 3, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants