don't collect labels anymore
don’t need, use binary code as the methods jump point
This commit is contained in:
@ -9,16 +9,22 @@ module Risc
|
||||
|
||||
def test_simple_collect
|
||||
objects = Risc::Collector.collect_space
|
||||
assert ((350 < objects.length) or (430 > objects.length)) , objects.length.to_s
|
||||
assert ((400 < objects.length) or (450 > objects.length)) , objects.length.to_s
|
||||
end
|
||||
|
||||
def test_collect_all_types
|
||||
objects = Risc::Collector.collect_space
|
||||
objects.each do |id, objekt|
|
||||
Risc::Collector.collect_space.each do |id, objekt|
|
||||
next unless objekt.is_a?( Parfait::Type )
|
||||
assert Parfait.object_space.get_type_for( objekt.hash ) , objekt.hash
|
||||
end
|
||||
end
|
||||
|
||||
def test_allowed_types
|
||||
Risc::Collector.collect_space.each do |id, objekt|
|
||||
next if objekt.is_a?( Parfait::Object )
|
||||
next if objekt.is_a?( Symbol )
|
||||
assert_equal 1 , objekt.class
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -10,14 +10,20 @@ module Risc
|
||||
def test_objects
|
||||
objects = @machine.objects
|
||||
assert_equal Hash , objects.class
|
||||
assert 400 < objects.length
|
||||
assert 350 < objects.length
|
||||
end
|
||||
|
||||
def test_position
|
||||
def test_position_length
|
||||
@machine.position_all
|
||||
objects = @machine.objects
|
||||
assert_equal Hash , objects.class
|
||||
assert 400 < objects.length
|
||||
assert 350 < objects.length
|
||||
end
|
||||
def test_has_positions
|
||||
@machine.position_all
|
||||
@machine.objects.each do |id,obj|
|
||||
assert Positioned.position(obj)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user