require "test/unit"
require "phi"
class TCStringList < Test::Unit::TestCase
  def test_new
    assert_nothing_raised { Phi::StringList.new }
  end

  def test_add
    list = Phi::StringList.new
    assert_equal 0, list.add('hello')
  end

  def test_add_object
    list = Phi::StringList.new
    assert_equal 0, list.add('hello', list)
    assert_equal list, list.object_at(0)
  end

  def test_insert
    list = Phi::StringList.new
    assert_equal list, list.insert(0, 'hello')
  end

  def test_insert_object
    list = Phi::StringList.new
    assert_equal list, list.insert(0, 'hello', list)
  end
end
