From 1da90cd0cdcc863cfc6f92569efdaf7730fb2cdc Mon Sep 17 00:00:00 2001 From: maekki Date: Sat, 28 Dec 2024 16:58:18 +0100 Subject: [PATCH 1/2] improve test names for binary search exercise --- .../binary-search/src/test/java/BinarySearchTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/practice/binary-search/src/test/java/BinarySearchTest.java b/exercises/practice/binary-search/src/test/java/BinarySearchTest.java index 5a1474e96..f7ae87caa 100644 --- a/exercises/practice/binary-search/src/test/java/BinarySearchTest.java +++ b/exercises/practice/binary-search/src/test/java/BinarySearchTest.java @@ -94,7 +94,7 @@ public void aValueSmallerThanTheArraysSmallestValueIsNotFound() { @Disabled("Remove to run test") @Test - public void aValueLargerThanTheArraysSmallestValueIsNotFound() throws ValueNotFoundException { + public void aValueLargerThanTheArraysLargestValueIsNotFound() throws ValueNotFoundException { List sortedList = List.of(1, 3, 4, 6, 8, 9, 11); BinarySearch search = new BinarySearch(sortedList); @@ -119,7 +119,7 @@ public void nothingIsFoundInAnEmptyArray() throws ValueNotFoundException { @Disabled("Remove to run test") @Test public void nothingIsFoundWhenTheLeftAndRightBoundCross() throws ValueNotFoundException { - List sortedList = List.of(1, 2); + List sortedList = List.of(2, 1); BinarySearch search = new BinarySearch(sortedList); From d482df5a69a65c4bd75531802e4310febdb145ba Mon Sep 17 00:00:00 2001 From: maekki Date: Sun, 29 Dec 2024 01:24:24 +0100 Subject: [PATCH 2/2] revert one unjustified change --- .../practice/binary-search/src/test/java/BinarySearchTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/practice/binary-search/src/test/java/BinarySearchTest.java b/exercises/practice/binary-search/src/test/java/BinarySearchTest.java index f7ae87caa..f586f744c 100644 --- a/exercises/practice/binary-search/src/test/java/BinarySearchTest.java +++ b/exercises/practice/binary-search/src/test/java/BinarySearchTest.java @@ -119,7 +119,7 @@ public void nothingIsFoundInAnEmptyArray() throws ValueNotFoundException { @Disabled("Remove to run test") @Test public void nothingIsFoundWhenTheLeftAndRightBoundCross() throws ValueNotFoundException { - List sortedList = List.of(2, 1); + List sortedList = List.of(1, 2); BinarySearch search = new BinarySearch(sortedList);