use factory to generte intergers in space

start with just integer factory in space
change all the hand-out code
still #14
This commit is contained in:
Torsten Ruger
2018-08-24 18:49:21 +03:00
parent d396da16e3
commit 71ab369c71
16 changed files with 59 additions and 61 deletions

View File

@ -31,18 +31,6 @@ module Parfait
assert_equal 20 , @int.set_internal_word( Integer.integer_index , 20 )
assert_equal 20 , @int.get_internal_word( Integer.integer_index )
end
def test_integer_first
assert Parfait.object_space.next_integer
end
def test_integer_20
int = Parfait.object_space.next_integer
20.times do
assert int
assert_equal Parfait::Integer , int.class
assert int.get_internal_word(1)
int = int.next_integer
end
end
def test_set
@int.set_value(1)
assert_equal 1 , @int.value