Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions exercises/practice/two-bucket/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ description = "Measure one step using bucket one of size 1 and bucket two of siz
[eb329c63-5540-4735-b30b-97f7f4df0f84]
description = "Measure using bucket one of size 2 and bucket two of size 3 - start with bucket one and end with bucket two"

[58d70152-bf2b-46bb-ad54-be58ebe94c03]
description = "Measure using bucket one much bigger than bucket two"

[9dbe6499-caa5-4a58-b5ce-c988d71b8981]
description = "Measure using bucket one much smaller than bucket two"

[449be72d-b10a-4f4b-a959-ca741e333b72]
description = "Not possible to reach the goal"

Expand Down
12 changes: 12 additions & 0 deletions exercises/practice/two-bucket/two_bucket.vader
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ Execute (Measure using bucket one of size 2 and bucket two of size 3 - start wit
let g:game = TwoBucket(g:input)
AssertEqual g:expected, g:game.Measure()

Execute (Measure using bucket one much bigger than bucket two):
let g:input = { "bucketOne": 5, "bucketTwo": 1, "goal": 2, "startBucket": "one" }
let g:expected = { "moves": 6, "goalBucket": "one", "otherBucket": 1 }
let g:game = TwoBucket(g:input)
AssertEqual g:expected, g:game.Measure()

Execute (Measure using bucket one much smaller than bucket two):
let g:input = { "bucketOne": 3, "bucketTwo": 15, "goal": 9, "startBucket": "one" }
let g:expected = { "moves": 6, "goalBucket": "two", "otherBucket": 0 }
let g:game = TwoBucket(g:input)
AssertEqual g:expected, g:game.Measure()

Execute (Not possible to reach the goal):
let g:input = { "bucketOne": 6, "bucketTwo": 15, "goal": 5, "startBucket": "one" }
let g:expected = "impossible"
Expand Down