Skip to content

Commit

Permalink
Improve the secure treasure chest exercise instructions (#368)
Browse files Browse the repository at this point in the history
The instructions previously didn't say what the
errors should be. You found that out after running
the tests.
  • Loading branch information
rokf authored Oct 13, 2023
1 parent d62c514 commit faad72d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/concept/secure-treasure-chest/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This function takes two arguments:

The function returns a `TreasureChest` containing the password and the value.

If the password is shorter than 8 characters then the function should return an error.
If the password is shorter than 8 characters then the function should return an error saying `Password must be at least 8 characters long`.

## 3. Define `open` function.

Expand All @@ -31,4 +31,4 @@ This function takes two arguments:
- A `TreasureChest`.
- A password `String`.

If the password matches the password in the `TreasureChest` then the function should return the treasure, otherwise it should return an error.
If the password matches the password in the `TreasureChest` then the function should return the treasure, otherwise it should return an error saying `Incorrect password`.

0 comments on commit faad72d

Please sign in to comment.