test to check that types are types
which led to dictionary bug
This commit is contained in:
parent
7f06e00ccd
commit
e80d028f7b
@ -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"
|
||||
|
18
test/register/test_machine.rb
Normal file
18
test/register/test_machine.rb
Normal 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
|
@ -6,6 +6,7 @@ class TestBasic < MiniTest::Test
|
||||
include AST::Sexp
|
||||
|
||||
def setup
|
||||
Register.machine.boot
|
||||
@output = Register::RegisterValue
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user