Skip to content

Commit 0804e09

Browse files
authored
Sync new two-bucket tests (#389)
[no important files changed]
1 parent 7b937d7 commit 0804e09

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-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.spec.coffee

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,30 @@ describe 'TwoBucket', ->
6262
expect(result.goalBucket).toEqual("two")
6363
expect(result.otherBucket).toEqual(0)
6464

65+
xit "Measure using bucket one much bigger than bucket two", ->
66+
twoBucket = new TwoBucket({
67+
bucketOne: 5
68+
bucketTwo: 1
69+
goal: 2
70+
startBucket: "one"
71+
})
72+
result = twoBucket.measure()
73+
expect(result.moves).toEqual(6)
74+
expect(result.goalBucket).toEqual("one")
75+
expect(result.otherBucket).toEqual(1)
76+
77+
xit "Measure using bucket one much smaller than bucket two", ->
78+
twoBucket = new TwoBucket({
79+
bucketOne: 3
80+
bucketTwo: 15
81+
goal: 9
82+
startBucket: "one"
83+
})
84+
result = twoBucket.measure()
85+
expect(result.moves).toEqual(6)
86+
expect(result.goalBucket).toEqual("two")
87+
expect(result.otherBucket).toEqual(0)
88+
6589
xit "Measure using bucket one of size 2 and bucket two of size 3 - start with bucket one and end with bucket two", ->
6690
twoBucket = new TwoBucket({
6791
bucketOne: 2

0 commit comments

Comments
 (0)