diff --git a/exercises/practice/change/.meta/tests.toml b/exercises/practice/change/.meta/tests.toml index 5428601..b9e9ee1 100644 --- a/exercises/practice/change/.meta/tests.toml +++ b/exercises/practice/change/.meta/tests.toml @@ -26,6 +26,9 @@ description = "possible change without unit coins available" [9a166411-d35d-4f7f-a007-6724ac266178] description = "another possible change without unit coins available" +[ce0f80d5-51c3-469d-818c-3e69dbd25f75] +description = "a greedy approach is not optimal" + [bbbcc154-e9e9-4209-a4db-dd6d81ec26bb] description = "no coins make 0 change" diff --git a/exercises/practice/change/run_test.v b/exercises/practice/change/run_test.v index 2011153..298e724 100644 --- a/exercises/practice/change/run_test.v +++ b/exercises/practice/change/run_test.v @@ -33,6 +33,10 @@ fn test_another_possible_change_without_unit_coins_available() { assert find_fewest_coins([4, 5], 27)! == [4, 4, 4, 5, 5, 5] } +fn test_a_greedy_approach_is_not_optimal() { + assert find_fewest_coins([1, 10, 11], 20)! == [10, 10] +} + fn test_no_coins_make_0_change() { assert find_fewest_coins([1, 5, 10, 21, 25], 0)! == [] } diff --git a/exercises/practice/knapsack/.meta/tests.toml b/exercises/practice/knapsack/.meta/tests.toml index 5a7805b..44e9347 100644 --- a/exercises/practice/knapsack/.meta/tests.toml +++ b/exercises/practice/knapsack/.meta/tests.toml @@ -4,6 +4,11 @@ [a4d7d2f0-ad8a-460c-86f3-88ba709d41a7] description = "no items" +include = false + +[3993a824-c20e-493d-b3c9-ee8a7753ee59] +description = "no items" +reimplements = "a4d7d2f0-ad8a-460c-86f3-88ba709d41a7" [1d39e98c-6249-4a8b-912f-87cb12e506b0] description = "one item, too heavy" diff --git a/exercises/practice/roman-numerals/.meta/tests.toml b/exercises/practice/roman-numerals/.meta/tests.toml index c92ccc5..0345244 100644 --- a/exercises/practice/roman-numerals/.meta/tests.toml +++ b/exercises/practice/roman-numerals/.meta/tests.toml @@ -77,5 +77,8 @@ description = "3000 is MMM" [3bc4b41c-c2e6-49d9-9142-420691504336] description = "3001 is MMMI" +[2f89cad7-73f6-4d1b-857b-0ef531f68b7e] +description = "3888 is MMMDCCCLXXXVIII" + [4e18e96b-5fbb-43df-a91b-9cb511fe0856] description = "3999 is MMMCMXCIX" diff --git a/exercises/practice/roman-numerals/run_test.v b/exercises/practice/roman-numerals/run_test.v index 03d9595..88c834d 100644 --- a/exercises/practice/roman-numerals/run_test.v +++ b/exercises/practice/roman-numerals/run_test.v @@ -100,6 +100,10 @@ fn test_3001_is_mmmi() { assert roman(3001) == 'MMMI' } +fn test_3888_is_mmmdccclxxxviii() { + assert roman(3888) == 'MMMDCCCLXXXVIII' +} + fn test_3999_is_mmmcmxcix() { assert roman(3999) == 'MMMCMXCIX' }