remove risc tests from rubyx layer
duplication, better ones in slot
This commit is contained in:
parent
90935bfbbc
commit
bc60f02f66
@ -4,7 +4,7 @@ module RubyX
|
|||||||
module Macro
|
module Macro
|
||||||
class TestIntegerSame < MiniTest::Test
|
class TestIntegerSame < MiniTest::Test
|
||||||
include MacroHelper
|
include MacroHelper
|
||||||
def op ; :== ; end
|
def op ; :>= ; end # is == valid ??
|
||||||
def len ; 24 ; end
|
def len ; 24 ; end
|
||||||
def source
|
def source
|
||||||
<<GET
|
<<GET
|
||||||
@ -25,9 +25,6 @@ GET
|
|||||||
assert_equal SlotMachine::Comparison , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::Comparison , compiler.slot_instructions.next.class
|
||||||
assert_equal op , compiler.slot_instructions.next.operator
|
assert_equal op , compiler.slot_instructions.next.operator
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal len , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
class TestIntegerLg < TestIntegerSame
|
class TestIntegerLg < TestIntegerSame
|
||||||
def op ; :> ; end
|
def op ; :> ; end
|
||||||
|
@ -22,9 +22,6 @@ GET
|
|||||||
def test_instr_get
|
def test_instr_get
|
||||||
assert_equal SlotMachine::Div10 , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::Div10 , compiler.slot_instructions.next.class
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal 70 , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -22,9 +22,6 @@ GET
|
|||||||
def test_instr_get
|
def test_instr_get
|
||||||
assert_equal SlotMachine::Div4 , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::Div4 , compiler.slot_instructions.next.class
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal 39 , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -24,9 +24,6 @@ GET
|
|||||||
assert_equal SlotMachine::IntOperator , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::IntOperator , compiler.slot_instructions.next.class
|
||||||
assert_equal op , compiler.slot_instructions.next.operator
|
assert_equal op , compiler.slot_instructions.next.operator
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal 40 , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
class TestIntegerMinus < TestIntegerPlus
|
class TestIntegerMinus < TestIntegerPlus
|
||||||
def op ; :- ; end
|
def op ; :- ; end
|
||||||
|
@ -22,9 +22,6 @@ GET
|
|||||||
def test_instr_get
|
def test_instr_get
|
||||||
assert_equal SlotMachine::Exit , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::Exit , compiler.slot_instructions.next.class
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal 38 , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -22,9 +22,6 @@ GET
|
|||||||
def test_instr_get
|
def test_instr_get
|
||||||
assert_equal SlotMachine::GetInternalWord , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::GetInternalWord , compiler.slot_instructions.next.class
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal 17 , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -22,9 +22,6 @@ GET
|
|||||||
def test_instr_get
|
def test_instr_get
|
||||||
assert_equal SlotMachine::Init , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::Init , compiler.slot_instructions.next.class
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal 30 , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -22,9 +22,6 @@ GET
|
|||||||
def test_instr_get
|
def test_instr_get
|
||||||
assert_equal SlotMachine::MethodMissing , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::MethodMissing , compiler.slot_instructions.next.class
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal 15 , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -22,9 +22,6 @@ GET
|
|||||||
def test_instr_get
|
def test_instr_get
|
||||||
assert_equal SlotMachine::SetInternalWord , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::SetInternalWord , compiler.slot_instructions.next.class
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal 19 , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -22,9 +22,6 @@ GET
|
|||||||
def test_instr_get
|
def test_instr_get
|
||||||
assert_equal SlotMachine::GetInternalByte , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::GetInternalByte , compiler.slot_instructions.next.class
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal 39 , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -22,9 +22,6 @@ GET
|
|||||||
def test_instr_get
|
def test_instr_get
|
||||||
assert_equal SlotMachine::Putstring , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::Putstring , compiler.slot_instructions.next.class
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal 42 , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -22,9 +22,6 @@ GET
|
|||||||
def test_instr_get
|
def test_instr_get
|
||||||
assert_equal SlotMachine::SetInternalByte , compiler.slot_instructions.next.class
|
assert_equal SlotMachine::SetInternalByte , compiler.slot_instructions.next.class
|
||||||
end
|
end
|
||||||
def test_risc
|
|
||||||
assert_equal 20 , compiler.to_risc.risc_instructions.length
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user