misc test fixes

This commit is contained in:
Torsten 2020-03-13 15:49:36 +02:00
parent 126466e9a9
commit 407ca6ef72
10 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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