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