eacc351b17
git-subtree-dir: PracticingAlgorithms git-subtree-mainline:0a9428093c
git-subtree-split:0b723f2ae0
15 lines
258 B
Ruby
15 lines
258 B
Ruby
require 'test/unit'
|
|
require 'sorting'
|
|
|
|
|
|
class TestSorting < Test::Unit::TestCase
|
|
def test_insertion_sort
|
|
tmpl = [8, 2, 4, 9, 3, 6]
|
|
a = Array.new(tmpl)
|
|
expected = [2, 3, 4, 6, 8, 9]
|
|
|
|
insertion_sort(a)
|
|
assert_equal(expected, a)
|
|
end
|
|
end
|