rename get_all_methods
This commit is contained in:
parent
dd2c2cb975
commit
06f51da8f1
@ -72,7 +72,7 @@ module Parfait
|
|||||||
end
|
end
|
||||||
|
|
||||||
# all methods form all types
|
# all methods form all types
|
||||||
def collect_methods
|
def get_all_methods
|
||||||
methods = []
|
methods = []
|
||||||
each_type do | type |
|
each_type do | type |
|
||||||
type.each_method do |meth|
|
type.each_method do |meth|
|
||||||
|
@ -17,14 +17,14 @@ class TestZeroCode < MiniTest::Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
def pest_empty_translate
|
def pest_empty_translate
|
||||||
assert_equal 2 , @space.collect_methods.length
|
assert_equal 2 , @space.get_all_methods.length
|
||||||
@machine.translate_arm
|
@machine.translate_arm
|
||||||
writer = Elf::ObjectWriter.new(@machine , @objects )
|
writer = Elf::ObjectWriter.new(@machine , @objects )
|
||||||
writer.save "test/zero.o"
|
writer.save "test/zero.o"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_methods_match_objects
|
def test_methods_match_objects
|
||||||
assert_equal 2 , @space.collect_methods.length
|
assert_equal 2 , @space.get_all_methods.length
|
||||||
@objects.each do |id , objekt|
|
@objects.each do |id , objekt|
|
||||||
next unless objekt.is_a? Parfait::TypedMethod
|
next unless objekt.is_a? Parfait::TypedMethod
|
||||||
assert keeper(objekt.name) , "CODE1 #{objekt.name}"
|
assert keeper(objekt.name) , "CODE1 #{objekt.name}"
|
||||||
|
@ -140,7 +140,7 @@ module Parfait
|
|||||||
type.remove_method(method)
|
type.remove_method(method)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
assert_equal 0 , @space.collect_methods.length
|
assert_equal 0 , @space.get_all_methods.length
|
||||||
end
|
end
|
||||||
def test_no_methods_in_types
|
def test_no_methods_in_types
|
||||||
test_remove_methods
|
test_remove_methods
|
||||||
|
@ -13,7 +13,7 @@ module Risc
|
|||||||
|
|
||||||
def test_translate_label
|
def test_translate_label
|
||||||
label = Parfait.object_space.get_main.risc_instructions
|
label = Parfait.object_space.get_main.risc_instructions
|
||||||
assert @translator.translate(label) , label
|
assert_equal "Space_Type.main" ,label.to_cpu(@translator).name , label
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_translate_space
|
def test_translate_space
|
||||||
|
Loading…
Reference in New Issue
Block a user