Skip to content

Commit 0952030

Browse files
authored
Sync new two-bucket tests (#360)
1 parent ada288f commit 0952030

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

exercises/practice/two-bucket/.meta/tests.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ description = "Measure one step using bucket one of size 1 and bucket two of siz
2727
[eb329c63-5540-4735-b30b-97f7f4df0f84]
2828
description = "Measure using bucket one of size 2 and bucket two of size 3 - start with bucket one and end with bucket two"
2929

30+
[58d70152-bf2b-46bb-ad54-be58ebe94c03]
31+
description = "Measure using bucket one much bigger than bucket two"
32+
33+
[9dbe6499-caa5-4a58-b5ce-c988d71b8981]
34+
description = "Measure using bucket one much smaller than bucket two"
35+
3036
[449be72d-b10a-4f4b-a959-ca741e333b72]
3137
description = "Not possible to reach the goal"
3238

exercises/practice/two-bucket/two_bucket.vader

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ Execute (Measure using bucket one of size 2 and bucket two of size 3 - start wit
3434
let g:game = TwoBucket(g:input)
3535
AssertEqual g:expected, g:game.Measure()
3636

37+
Execute (Measure using bucket one much bigger than bucket two):
38+
let g:input = { "bucketOne": 5, "bucketTwo": 1, "goal": 2, "startBucket": "one" }
39+
let g:expected = { "moves": 6, "goalBucket": "one", "otherBucket": 1 }
40+
let g:game = TwoBucket(g:input)
41+
AssertEqual g:expected, g:game.Measure()
42+
43+
Execute (Measure using bucket one much smaller than bucket two):
44+
let g:input = { "bucketOne": 3, "bucketTwo": 15, "goal": 9, "startBucket": "one" }
45+
let g:expected = { "moves": 6, "goalBucket": "two", "otherBucket": 0 }
46+
let g:game = TwoBucket(g:input)
47+
AssertEqual g:expected, g:game.Measure()
48+
3749
Execute (Not possible to reach the goal):
3850
let g:input = { "bucketOne": 6, "bucketTwo": 15, "goal": 5, "startBucket": "one" }
3951
let g:expected = "impossible"

0 commit comments

Comments
 (0)