Quite small amount of parfait tests needed changing after that
But something is amiss anyway, especially dynamic jumps
This commit is contained in:
parent
81e3c0c270
commit
d82cedf4c0
@ -94,13 +94,5 @@ module Parfait
|
||||
get_instance_variables.to_a.collect{ |n| n.to_s.to_sym }
|
||||
end
|
||||
|
||||
# name comes in as a ruby var name
|
||||
def instance_variable_ged( name )
|
||||
#TODO the [] shoud be a range, but currenly that is not processed in RubyCompiler
|
||||
var = get_instance_variable name.to_s[1 , name.to_s.length - 1].to_sym
|
||||
#puts "getting #{name} #{var}"
|
||||
var
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -19,7 +19,7 @@ module Parfait
|
||||
assert_nil @mess.method
|
||||
end
|
||||
def test_message_next_set
|
||||
@mess.next_message = :next_message
|
||||
@mess._set_next_message :next_message
|
||||
assert_equal :next_message , @mess.next_message
|
||||
end
|
||||
def test_message_type_set
|
||||
@ -27,7 +27,7 @@ module Parfait
|
||||
assert_equal @type , @mess.get_type
|
||||
end
|
||||
def test_attribute_index
|
||||
@mess.next_message = :message
|
||||
@mess._set_next_message :message
|
||||
assert_equal Parfait::Type , @mess.get_type.class
|
||||
end
|
||||
|
||||
|
@ -68,7 +68,8 @@ module Parfait
|
||||
end
|
||||
def test_one_set1
|
||||
assert_equal 2 , @list.set(0,2)
|
||||
assert_equal 1 , @list.get_internal_word(1)
|
||||
# assert_equal 1 , @list.get_internal_word(1)
|
||||
assert_equal 1 , @list.get_length
|
||||
assert_equal 2 , @list.get_internal_word(List.type_length)
|
||||
end
|
||||
def test_set1_len
|
||||
|
@ -46,7 +46,7 @@ module Parfait
|
||||
assert_equal classes.length , @space.classes.length , @space.classes.keys.inspect
|
||||
end
|
||||
def test_types
|
||||
assert @space.instance_variable_ged("@types").is_a? Parfait::Dictionary
|
||||
assert @space.types.is_a? Parfait::Dictionary
|
||||
end
|
||||
def test_types_attr
|
||||
assert @space.types.is_a? Parfait::Dictionary
|
||||
@ -57,7 +57,7 @@ module Parfait
|
||||
end
|
||||
end
|
||||
def test_types_hashes
|
||||
types = @space.instance_variable_ged("@types")
|
||||
types = @space.types
|
||||
types.each do |has , type|
|
||||
assert has.is_a?(::Integer) , has.inspect
|
||||
end
|
||||
|
@ -5,7 +5,7 @@ module Parfait
|
||||
|
||||
def setup
|
||||
super
|
||||
@types = @space.instance_variable_ged("@types")
|
||||
@types = @space.types
|
||||
@first = @types.values.first
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user