test to check that types are types

which led to dictionary bug
This commit is contained in:
Torsten Ruger 2016-12-30 20:48:14 +02:00
parent 7f06e00ccd
commit e80d028f7b
3 changed files with 20 additions and 0 deletions

View File

@ -2,5 +2,6 @@ require_relative "interpreter/test_all"
require_relative "test_compat"
require_relative "test_instructions"
require_relative "test_machine"
require_relative "test_padding"
require_relative "test_positioning"

View File

@ -0,0 +1,18 @@
require_relative "../helper"
module Register
class TestMachine < MiniTest::Test
def setup
@machine = Register.machine.boot
end
def test_collect_all_types
@machine.collect_space
@machine.objects.each do |id, objekt|
next unless objekt.is_a?( Parfait::Type )
assert Parfait.object_space.get_type_for( objekt.hash ) , objekt.hash
end
end
end
end

View File

@ -6,6 +6,7 @@ class TestBasic < MiniTest::Test
include AST::Sexp
def setup
Register.machine.boot
@output = Register::RegisterValue
end