test of merge_sort

Ruby code posted by slothbear
created at 23 Sep 18:15

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
require "test/unit"
require "merge_sort"

# Tests use Array#sort as authoritative; good enough for now.

class TestMergeSort < Test::Unit::TestCase
  def test_empty_array
    a = []
    assert_equal(a, a.merge_sort)
  end
end
235 Bytes in 2 ms with coderay