From 407ca6ef7216b0bb476ce3fb8c23071c55a497e3 Mon Sep 17 00:00:00 2001 From: Torsten Date: Fri, 13 Mar 2020 15:49:36 +0200 Subject: [PATCH] misc test fixes --- test/risc/test_collector.rb | 4 ++-- test/risc/test_interpreter_platform.rb | 2 +- test/risc/test_method_compiler.rb | 2 +- test/rubyx/macro/test_integer_div4.rb | 2 +- test/rubyx/macro/test_integer_operator.rb | 2 +- test/rubyx/macro/test_object_exit.rb | 2 +- test/rubyx/macro/test_object_get.rb | 2 +- test/rubyx/macro/test_object_init.rb | 2 +- test/rubyx/macro/test_word_get.rb | 2 +- test/rubyx/macro/test_word_putstring.rb | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/risc/test_collector.rb b/test/risc/test_collector.rb index fec8e424..7c62668e 100644 --- a/test/risc/test_collector.rb +++ b/test/risc/test_collector.rb @@ -38,7 +38,7 @@ module Risc end def len - 1426 + 1427 end def test_collect_all_types @@ -70,7 +70,7 @@ module Risc end def len - 2906 + 2907 end end end diff --git a/test/risc/test_interpreter_platform.rb b/test/risc/test_interpreter_platform.rb index 2a6f040e..618f2afb 100644 --- a/test/risc/test_interpreter_platform.rb +++ b/test/risc/test_interpreter_platform.rb @@ -31,7 +31,7 @@ module Risc def test_load_translates_label label = Risc.label("test" , "test",nil) - load = Risc.load_constant("source" , label , :r1) + load = Risc.load_constant("source" , label ) translated = @translator.translate(load) assert label != translated.constant end diff --git a/test/risc/test_method_compiler.rb b/test/risc/test_method_compiler.rb index 7f3f5488..9d309cbb 100644 --- a/test/risc/test_method_compiler.rb +++ b/test/risc/test_method_compiler.rb @@ -15,7 +15,7 @@ module Risc end def test_compiles_all_risc assert_equal Risc::LoadConstant , @compiler.risc_instructions.next.class - assert_equal 16 , @compiler.risc_instructions.length + assert_equal 15 , @compiler.risc_instructions.length end def test_translate_cpu cpu = @compiler.translate_cpu(Platform.for(:arm).translator) diff --git a/test/rubyx/macro/test_integer_div4.rb b/test/rubyx/macro/test_integer_div4.rb index b742548b..a4bf2127 100644 --- a/test/rubyx/macro/test_integer_div4.rb +++ b/test/rubyx/macro/test_integer_div4.rb @@ -23,7 +23,7 @@ GET assert_equal SlotMachine::Div4 , compiler.slot_instructions.next.class end def test_risc - assert_equal 41 , compiler.to_risc.risc_instructions.length + assert_equal 39 , compiler.to_risc.risc_instructions.length end end end diff --git a/test/rubyx/macro/test_integer_operator.rb b/test/rubyx/macro/test_integer_operator.rb index b7c46f1e..c7fe1c89 100644 --- a/test/rubyx/macro/test_integer_operator.rb +++ b/test/rubyx/macro/test_integer_operator.rb @@ -25,7 +25,7 @@ GET assert_equal op , compiler.slot_instructions.next.operator end def test_risc - assert_equal 42 , compiler.to_risc.risc_instructions.length + assert_equal 40 , compiler.to_risc.risc_instructions.length end end class TestIntegerMinus < TestIntegerPlus diff --git a/test/rubyx/macro/test_object_exit.rb b/test/rubyx/macro/test_object_exit.rb index 777fa4c6..cda2d29f 100644 --- a/test/rubyx/macro/test_object_exit.rb +++ b/test/rubyx/macro/test_object_exit.rb @@ -23,7 +23,7 @@ GET assert_equal SlotMachine::Exit , compiler.slot_instructions.next.class end def test_risc - assert_equal 40 , compiler.to_risc.risc_instructions.length + assert_equal 38 , compiler.to_risc.risc_instructions.length end end end diff --git a/test/rubyx/macro/test_object_get.rb b/test/rubyx/macro/test_object_get.rb index 8e59f14a..28b6d11e 100644 --- a/test/rubyx/macro/test_object_get.rb +++ b/test/rubyx/macro/test_object_get.rb @@ -23,7 +23,7 @@ GET assert_equal SlotMachine::GetInternalWord , compiler.slot_instructions.next.class end def test_risc - assert_equal 18 , compiler.to_risc.risc_instructions.length + assert_equal 17 , compiler.to_risc.risc_instructions.length end end end diff --git a/test/rubyx/macro/test_object_init.rb b/test/rubyx/macro/test_object_init.rb index 144073f6..ad720301 100644 --- a/test/rubyx/macro/test_object_init.rb +++ b/test/rubyx/macro/test_object_init.rb @@ -23,7 +23,7 @@ GET assert_equal SlotMachine::Init , compiler.slot_instructions.next.class end def test_risc - assert_equal 31 , compiler.to_risc.risc_instructions.length + assert_equal 30 , compiler.to_risc.risc_instructions.length end end end diff --git a/test/rubyx/macro/test_word_get.rb b/test/rubyx/macro/test_word_get.rb index 869bbe97..0eb2b331 100644 --- a/test/rubyx/macro/test_word_get.rb +++ b/test/rubyx/macro/test_word_get.rb @@ -23,7 +23,7 @@ GET assert_equal SlotMachine::GetInternalByte , compiler.slot_instructions.next.class end def test_risc - assert_equal 41 , compiler.to_risc.risc_instructions.length + assert_equal 39 , compiler.to_risc.risc_instructions.length end end end diff --git a/test/rubyx/macro/test_word_putstring.rb b/test/rubyx/macro/test_word_putstring.rb index 0ae0c2e7..8827c638 100644 --- a/test/rubyx/macro/test_word_putstring.rb +++ b/test/rubyx/macro/test_word_putstring.rb @@ -23,7 +23,7 @@ GET assert_equal SlotMachine::Putstring , compiler.slot_instructions.next.class end def test_risc - assert_equal 44 , compiler.to_risc.risc_instructions.length + assert_equal 42 , compiler.to_risc.risc_instructions.length end end end