Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7e10e8a54a
Fetching contributors…

Cannot retrieve contributors at this time

file 24 lines (19 sloc) 0.383 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
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
Something went wrong with that request. Please try again.