From e0e6d91ae51edebf9fa9e4718f4f05524e87cfca Mon Sep 17 00:00:00 2001 From: Tammo Behrends Date: Fri, 21 Apr 2017 15:17:37 +0200 Subject: [PATCH 1/2] two-bucket: Add additional tests Adds one test where `goal == start bucket` (one step) and a second test where `start_bucket != goal_bucket`. --- exercises/two-bucket/canonical-data.json | 26 +++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/exercises/two-bucket/canonical-data.json b/exercises/two-bucket/canonical-data.json index 25256b0da6..db7c3dabf6 100644 --- a/exercises/two-bucket/canonical-data.json +++ b/exercises/two-bucket/canonical-data.json @@ -1,6 +1,6 @@ { "exercise": "two-bucket", - "version": "1.0.1", + "version": "1.1.0", "cases": [ { "description": "Measure using bucket one of size 3 and bucket two of size 5 - start with bucket one", @@ -52,6 +52,30 @@ "moves": 18, "goal_bucket": "two", "other_bucket": 7 + }, + { + "description": "Measure one step using bucket one of size 1 and bucket two of size 3 - start with bucket two", + "property": "measure", + "bucket_one": 1, + "bucket_two": 3, + "goal": 3, + "start_bucket": "two", + "expected": { + "moves": 1, + "goal_bucket": "two", + "other_bucket": 0 + }, + { + "description": "Measure using bucket one of size 2 and bucket two of size 3 - start with bucket one and end with bucket two", + "property": "measure", + "bucket_one": 2, + "bucket_two": 3, + "goal": 3, + "start_bucket": "one", + "expected": { + "moves": 4, + "goal_bucket": "two", + "other_bucket": 1 } } ] From 72332759af416a6a320fa9382e659c2a6d3199b8 Mon Sep 17 00:00:00 2001 From: Tammo Behrends Date: Fri, 21 Apr 2017 15:24:54 +0200 Subject: [PATCH 2/2] Fix brackets --- exercises/two-bucket/canonical-data.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/exercises/two-bucket/canonical-data.json b/exercises/two-bucket/canonical-data.json index db7c3dabf6..06a709242c 100644 --- a/exercises/two-bucket/canonical-data.json +++ b/exercises/two-bucket/canonical-data.json @@ -52,8 +52,9 @@ "moves": 18, "goal_bucket": "two", "other_bucket": 7 - }, - { + } + }, + { "description": "Measure one step using bucket one of size 1 and bucket two of size 3 - start with bucket two", "property": "measure", "bucket_one": 1, @@ -64,8 +65,9 @@ "moves": 1, "goal_bucket": "two", "other_bucket": 0 - }, - { + } + }, + { "description": "Measure using bucket one of size 2 and bucket two of size 3 - start with bucket one and end with bucket two", "property": "measure", "bucket_one": 2,