Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (19 sloc) 383 Bytes
require "test/unit"
require "stree"
class TestStree < Test::Unit::TestCase
def setup
@tree = Stree.new
end
def test_new
assert Stree.new
end
def test_push
@tree.push 'foo'
end
def test_longest_common_substr
@tree.push 'yokatta'
@tree.push 'nemukatta'
list = @tree.longest_common_substr(0, 10)
assert_equal 'katta', list.first
end
end