fix mom and vool after cc changes

This commit is contained in:
2019-08-23 10:21:22 +03:00
parent ec1e8c8f3a
commit 5e44e9caaf
16 changed files with 50 additions and 64 deletions

View File

@ -15,7 +15,7 @@ module Parfait
def test_message_name_nil
last = @type.names.last
assert_equal :arg6 , last , @type.names.inspect
assert_equal :local15 , last , @type.names.inspect
assert_nil @mess.method
end
def test_message_next_set

View File

@ -10,23 +10,31 @@ module Parfait
def test_args_start
assert_equal 8 , Message.args_start_at
end
def test_locals_start
assert_equal 15 , Message.locals_start_at
end
def test_length
assert_equal 15 , @mess.get_type.instance_length , @mess.get_type.inspect
assert_equal 31 , @mess.get_type.instance_length , @mess.get_type.inspect
end
def test_attribute_set
@mess.set_receiver( 55 ) # 55 is not parfait, hance not actually allowed
assert_equal 55 , @mess.receiver
end
def test_indexed
def test_indexed_arg
assert_equal 8 , @mess.get_type.variable_index(:arguments_given)
assert_equal 9 , @mess.get_type.variable_index(:arg1)
assert_equal 13 , @mess.get_type.variable_index(:arg5)
end
def test_indexed_local
assert_equal 15 , @mess.get_type.variable_index(:locals_used)
assert_equal 16 , @mess.get_type.variable_index(:local1)
assert_equal 30 , @mess.get_type.variable_index(:local15)
end
def test_next_message
assert_equal Message , @mess.next_message.class
end
def test_locals
assert_equal NamedList , @mess.frame.class
assert_equal Integer , @mess.locals_used.class
end
def test_arguments
assert_equal Integer , @mess.arguments_given.class

View File

@ -3,18 +3,6 @@ require_relative "helper"
module Parfait
class TestNamedLists < ParfaitTest
def setup
super
@named_list = @space.get_next_for(:Message).frame
@type = @named_list.get_type
end
def test_named_list_get_type
assert_equal Type , @type.class
assert @type.names
assert @named_list.get_instance_variables
end
def test_new
list = NamedList.new
assert list.get_type

View File

@ -198,7 +198,7 @@ module Parfait
count = 0
while(mess)
count += 1
assert mess.frame
assert mess.locals_used
mess = mess.next_message
end
assert_equal 1014, count

View File

@ -22,7 +22,7 @@ module Parfait
def test_length
assert @mess
assert @mess.get_type
assert_equal 15 , @mess.get_type.instance_length , @mess.get_type.inspect
assert_equal 31 , @mess.get_type.instance_length , @mess.get_type.inspect
end
def test_names
@ -33,7 +33,7 @@ module Parfait
end
def test_type_length
assert_equal 15 , @mess.get_type.instance_length , @mess.get_type.inspect
assert_equal 31 , @mess.get_type.instance_length , @mess.get_type.inspect
end
def test_type_length_index
@ -45,7 +45,7 @@ module Parfait
def test_no_index_below_0
type = @mess.get_type
names = type.names
assert_equal 15 , names.get_length , names.inspect
assert_equal 31 , names.get_length , names.inspect
names.each do |n|
assert type.variable_index(n) >= 0
end