change to position objects complete
This commit is contained in:
@ -2,6 +2,9 @@ require_relative "../helper"
|
||||
|
||||
class HelloTest < MiniTest::Test
|
||||
|
||||
def setup
|
||||
Risc.machine
|
||||
end
|
||||
def check
|
||||
Vool::VoolCompiler.ruby_to_binary( "class Space;def main(arg);#{@input};end;end" )
|
||||
writer = Elf::ObjectWriter.new(Risc.machine)
|
||||
|
@ -17,10 +17,17 @@ module Risc
|
||||
res = Position.new(5) - 1
|
||||
assert_equal 4 , res
|
||||
end
|
||||
def test_sub_pos
|
||||
res = Position.new(5) - Position.new(1)
|
||||
assert_equal 4 , res
|
||||
end
|
||||
def test_set
|
||||
pos = Position.set_position(self , 5)
|
||||
assert_equal 5 , pos.at
|
||||
end
|
||||
def tet_tos
|
||||
assert_equal "0x10" , Position.set_position(self).to_s
|
||||
end
|
||||
def test_reset_ok
|
||||
pos = Position.set_position(self , 5)
|
||||
pos = Position.set_position(self , 10)
|
||||
|
Reference in New Issue
Block a user