And we are green again

After having over 600 failing tests at one point, this does feel good.
Even better, most of the risc/interpreter tests where i didn't change anything came gree without changing the tests. ie we have binary compatibility.
This commit is contained in:
2019-08-14 11:11:26 +03:00
parent c13a8ceb11
commit b2260d856d
14 changed files with 73 additions and 38 deletions

View File

@ -41,7 +41,7 @@ module Risc
ret = main_ticks(68)
assert_equal FunctionReturn , ret.class
assert_equal :r1 , ret.register.symbol
assert_equal 24204 , @interpreter.get_register(ret.register)
assert_equal 23196 , @interpreter.get_register(ret.register)
end
end
end

View File

@ -55,7 +55,7 @@ module Risc
def test_simple_collect
objects = Collector.collect_space(@linker)
assert_equal 2422, objects.length , objects.length.to_s
assert_equal 2421, objects.length , objects.length.to_s
end
def test_integer_positions

View File

@ -25,7 +25,7 @@ module Risc
assert_equal 0 , Position.get(@linker.cpu_init).at
end
def test_cpu_at
assert_equal "0x562c" , Position.get(@linker.cpu_init.first).to_s
assert_equal "0x563c" , Position.get(@linker.cpu_init.first).to_s
end
def test_cpu_label
assert_equal Position , Position.get(@linker.cpu_init.first).class

View File

@ -5,7 +5,6 @@ module Risc
def setup
code = "class Space; def main(arg);a = 1;return a;end;end"
@linker = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_binary(code, :arm)
@linker.position_all
end
def test_positions_set
@linker.object_positions.each do |obj , position|
@ -17,7 +16,7 @@ module Risc
assert_equal 1 , mains.length
end
def test_assembler_num
assert_equal 23 , @linker.assemblers.length
assert_equal 22 , @linker.assemblers.length
end
end
end