rubyx/test/risc/test_text_writer.rb
Torsten Ruger 3844a738cd rename assembler to text_writer
as “assembly” really happens in the machine now
2018-03-29 18:17:19 +03:00

23 lines
530 B
Ruby

require_relative "../helper"
module Risc
class TestTextWriter < MiniTest::Test
def setup
@machine = Risc.machine.boot
end
def test_init
@text_writer = TextWriter.new(@machine)
end
def test_write_fails
@text_writer = TextWriter.new(@machine)
assert_raises{ @text_writer.write_as_string} #must translate first
end
def test_write_space
assert @machine.position_all
@text_writer = TextWriter.new(@machine)
assert @text_writer.write_as_string
end
end
end