remove booted flag

just boot if needed
This commit is contained in:
Torsten Ruger
2018-06-29 11:36:14 +03:00
parent f1b09ac58d
commit 606c7bf906
5 changed files with 26 additions and 33 deletions

View File

@ -0,0 +1,23 @@
require_relative "helper"
module Parfait
class TestCompat < MiniTest::Test
def setup
Risc.machine.boot
end
def test_list_create_from_array
array = [1,2,3]
list = Parfait.new_list(array)
assert_equal array , list.to_a
end
def test_word_create_from_string
string = "something"
word = Parfait.new_word(string)
assert_equal word , Parfait.new_word(string)
assert_equal string , word.to_string
end
end
end

View File

@ -7,9 +7,6 @@ module Parfait
[:Word,:List,:Message,:NamedList,:Type,:Object,:Class,:Dictionary,:TypedMethod , :Integer]
end
def test_booted
assert_equal true , @machine.booted
end
def test_space_length
assert_equal 8 , @space.get_type.instance_length , @space.get_type.inspect
end

View File

@ -1,22 +0,0 @@
require_relative "../helper"
class TestCompat < MiniTest::Test
def setup
Risc.machine.boot unless Risc.machine.booted
end
def test_list_create_from_array
array = [1,2,3]
list = Parfait.new_list(array)
assert_equal array , list.to_a
end
def test_word_create_from_string
string = "something"
word = Parfait.new_word(string)
assert_equal word , Parfait.new_word(string)
assert_equal string , word.to_string
end
end