Skip to content

Commit

Permalink
Test for incorrect greedy algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
kotp committed Aug 27, 2017
1 parent 0a36d22 commit c6a81c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion exercises/change/change_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'minitest/autorun'
require_relative 'change'

# Common test data version: 1.0.0 3d8b5b3
# Common test data version: 1.1.0 52cf1cf
class ChangeTest < Minitest::Test
def test_single_coin_change
# skip
Expand Down Expand Up @@ -33,6 +33,11 @@ def test_possible_change_without_unit_coins_available
assert_equal [2, 2, 2, 5, 10], Change.generate([2, 5, 10, 20, 50], 21)
end

def test_another_possible_change_without_unit_coins_available
skip
assert_equal [4, 4, 4, 5, 5, 5], Change.generate([4, 5], 27)
end

def test_no_coins_make_0_change
skip
assert_equal [], Change.generate([1, 5, 10, 21, 25], 0)
Expand Down

0 comments on commit c6a81c3

Please sign in to comment.