crete positions while collecting objects
clear two phase lifecycle for positions always created invalid and set later new does not auto add to cache but create and get_or_create do
This commit is contained in:
@ -13,17 +13,23 @@ module Risc
|
||||
end
|
||||
|
||||
def test_collect_all_types
|
||||
Risc::Collector.collect_space.each do |id, objekt|
|
||||
Risc::Collector.collect_space.each do |objekt , position|
|
||||
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|
|
||||
Risc::Collector.collect_space.each do |objekt , position|
|
||||
next if objekt.is_a?( Parfait::Object )
|
||||
next if objekt.is_a?( Symbol )
|
||||
assert_equal 1 , objekt.class
|
||||
assert false
|
||||
end
|
||||
end
|
||||
def test_positions
|
||||
Risc::Collector.collect_space.each do |objekt , position|
|
||||
assert_equal Position , position.class
|
||||
assert !position.valid?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user