remove booted flag
just boot if needed
This commit is contained in:
23
test/parfait/test_compat.rb
Normal file
23
test/parfait/test_compat.rb
Normal 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
|
@ -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
|
||||
|
Reference in New Issue
Block a user