simple collector test

This commit is contained in:
Torsten Ruger 2016-12-31 21:05:19 +02:00
parent 86dafccb04
commit b7147b3dd4
2 changed files with 18 additions and 0 deletions

View File

@ -1,5 +1,6 @@
require_relative "interpreter/test_all"
require_relative "test_collector"
require_relative "test_compat"
require_relative "test_instructions"
require_relative "test_machine"

View File

@ -0,0 +1,17 @@
require_relative "../helper"
module Register
class TestCollector < MiniTest::Test
def test_collect_raises
Parfait.set_object_space( BootSpace.new )
assert_raises {Register::Collector.collect_space}
end
def test_simple_collect
Machine.new.boot
objects = Register::Collector.collect_space
assert_equal 352 , objects.length
end
end
end