misc little test fixes

This commit is contained in:
Torsten Ruger
2018-07-03 10:12:40 +03:00
parent bb1d1495db
commit cab6bc389f
7 changed files with 30 additions and 34 deletions

View File

@ -11,6 +11,11 @@ module Risc
def test_class
assert_equal Risc::Interpreter , Interpreter.new(@linker).class
end
def test_starts
interpreter = Interpreter.new(@linker)
@linker.position_all
assert_equal 0 , interpreter.start_program
end
def test_starts_stopped
assert_equal :stopped , Interpreter.new(@linker).state
end
@ -27,15 +32,10 @@ module Risc
@string_input = as_main("return 5")
super
end
def test_starts
assert_equal 0 , @interpreter.start_program
end
def test_started
@interpreter.start_program
assert_equal :running , @interpreter.state
end
def test_pos
@interpreter.start_program
assert_equal 1 , @interpreter.clock
end
end
@ -44,7 +44,6 @@ module Risc
def setup
@string_input = as_main("return 5")
super
@interpreter.start_program
end
def test_tick1
assert_equal 2 , @interpreter.tick