bit more testing

This commit is contained in:
Torsten Ruger 2015-08-06 18:26:59 +03:00
parent 8560f15c87
commit c0071c947d

View File

@ -6,7 +6,7 @@ class TestSpace < MiniTest::Test
@machine = Virtual.machine.boot @machine = Virtual.machine.boot
end end
def classes def classes
[:Kernel,:Word,:List,:Message,:Frame,:Layout,:Class,:Dictionary,:Method] [:Kernel,:Word,:List,:Message,:Frame,:Layout,:Class,:Dictionary,:Method , :Integer]
end end
def test_booted def test_booted
assert_equal true , @machine.booted assert_equal true , @machine.booted
@ -17,6 +17,11 @@ class TestSpace < MiniTest::Test
def test_global_space def test_global_space
assert_equal Parfait::Space , Parfait::Space.object_space.class assert_equal Parfait::Space , Parfait::Space.object_space.class
end end
def test_intger
int = Parfait::Space.object_space.get_class_by_name :Integer
assert_equal 3, int.method_names.get_length
assert int.get_instance_method( :plus )
end
def test_classes_class def test_classes_class
classes.each do |name| classes.each do |name|
assert_equal :Class , @machine.space.classes[name].get_class.name assert_equal :Class , @machine.space.classes[name].get_class.name