seperate args from message (just like frame)

This commit is contained in:
Torsten Ruger
2016-12-21 22:35:36 +02:00
parent ed12108425
commit c3c52d36b8
12 changed files with 46 additions and 70 deletions

View File

@ -8,7 +8,6 @@ class TestMessage < MiniTest::Test
def test_length
assert_equal 9 , @mess.get_type.instance_length , @mess.get_type.inspect
assert_equal 9 , Parfait::Message.get_length_index
end
def test_attribute_set
@ -17,39 +16,7 @@ class TestMessage < MiniTest::Test
end
def test_indexed
assert_equal 9 , @mess.get_type.variable_index(:indexed_length)
end
def test_push1
@mess.push :name
assert_equal 1 , @mess.get_length
end
def test_push2
@mess.push :name
assert_equal 1 , @mess.indexed_length
end
def test_push3
@mess.push :name
assert_equal 1 , @mess.get_internal_word(9)
end
def test_get_internal_word
@mess.push :name
assert_equal :name , @mess.get_internal_word(10)
end
def test_get
index = @mess.push :name
assert_equal 1 , index
assert_equal :name , @mess.get(1)
end
def test_each
three = [:one,:two,:three]
three.each {|i| @mess.push(i)}
assert_equal 3 , @mess.get_length
@mess.each do |u|
assert_equal u , three.delete(u)
end
assert_equal 0 , three.length
assert_equal 9 , @mess.get_type.variable_index(:arguments)
end
end