Derive Class and MetaClass from Behaviour
Finally! If i remember the module was from before i had any non Object superclasses unified code, unified bugs :-) just makes sense
This commit is contained in:
@ -38,7 +38,7 @@ module Risc
|
||||
ret = main_ticks(49)
|
||||
assert_equal FunctionReturn , ret.class
|
||||
assert_equal :r3 , ret.register.symbol
|
||||
assert_equal 37852 , @interpreter.get_register(ret.register)
|
||||
assert_equal 38236 , @interpreter.get_register(ret.register)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -38,7 +38,7 @@ module Risc
|
||||
end
|
||||
|
||||
def len
|
||||
1471
|
||||
1479
|
||||
end
|
||||
|
||||
def test_collect_all_types
|
||||
@ -70,7 +70,7 @@ module Risc
|
||||
end
|
||||
|
||||
def len
|
||||
2951
|
||||
2959
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -54,7 +54,7 @@ module Risc
|
||||
end
|
||||
def test_pc
|
||||
@interpreter.tick
|
||||
assert_equal t = 37416 , @interpreter.pc
|
||||
assert_equal t = 37800 , @interpreter.pc
|
||||
@interpreter.tick
|
||||
assert_equal t + 4 , @interpreter.pc
|
||||
end
|
||||
|
@ -24,7 +24,7 @@ module Risc
|
||||
assert_equal 0 , Position.get(@linker.cpu_init).at
|
||||
end
|
||||
def test_cpu_at
|
||||
assert_equal "0x931c" , Position.get(@linker.cpu_init.first).to_s
|
||||
assert_equal "0x941c" , Position.get(@linker.cpu_init.first).to_s
|
||||
end
|
||||
def test_cpu_label
|
||||
assert_equal Position , Position.get(@linker.cpu_init.first).class
|
||||
|
@ -15,7 +15,7 @@ module Risc
|
||||
def create_method(body = "@ivar = 5;return")
|
||||
in_test_vool("def meth; #{body};end")
|
||||
test = Parfait.object_space.get_class_by_name(:Test)
|
||||
test.get_method(:meth)
|
||||
test.get_instance_method(:meth)
|
||||
end
|
||||
|
||||
def test_method_has_source
|
||||
@ -55,7 +55,7 @@ module Risc
|
||||
def test_callable_method_has_one_local
|
||||
in_test_vool("def meth; local = 5 ; a = 6;return;end")
|
||||
test = Parfait.object_space.get_class_by_name(:Test)
|
||||
method = test.get_method(:meth)
|
||||
method = test.get_instance_method(:meth)
|
||||
assert_equal 3 , method.frame_type.instance_length
|
||||
assert_equal 1 , method.frame_type.variable_index(:local)
|
||||
assert_equal 2 , method.frame_type.variable_index(:a)
|
||||
|
Reference in New Issue
Block a user