fixing offset bug
found by tests that overwrite the attribute
This commit is contained in:
@ -33,6 +33,15 @@ class TestList < MiniTest::Test
|
||||
assert_equal 1 , layout.variable_index(:layout)
|
||||
end
|
||||
|
||||
def test_length0
|
||||
assert_equal 0 , @list.get_length
|
||||
assert_equal nil , @list.indexed_length
|
||||
end
|
||||
def test_length1
|
||||
@list.push :one
|
||||
assert_equal 1 , @list.get_length
|
||||
assert_equal 1 , @list.indexed_length
|
||||
end
|
||||
def test_list_inspect
|
||||
@list.set(1,1)
|
||||
assert_equal "1" , @list.inspect
|
||||
@ -54,7 +63,7 @@ class TestList < MiniTest::Test
|
||||
end
|
||||
def test_one_set1
|
||||
assert_equal 2 , @list.set(1,2)
|
||||
assert_equal 1 , @list.internal_object_get(1)
|
||||
assert_equal 1 , @list.internal_object_get(2)
|
||||
end
|
||||
def test_set1_len
|
||||
@list.set(1,1)
|
||||
|
Reference in New Issue
Block a user