Fix comparison macro
which leaves a definite need for instruction level testing
This commit is contained in:
@ -14,22 +14,23 @@ module SlotMachine
|
||||
assert_equal Risc::MethodCompiler , @method.to_risc.class
|
||||
end
|
||||
def test_risc_length
|
||||
assert_equal 26 , @method.to_risc.risc_instructions.length
|
||||
assert_equal 25 , @method.to_risc.risc_instructions.length
|
||||
end
|
||||
#TODO, check the actual instructions, at least by class
|
||||
end
|
||||
class TestIntComp2Risc < BootTest
|
||||
def setup
|
||||
@method = get_compiler("Integer",:gt)
|
||||
@method = get_compiler("Integer",:ge)
|
||||
end
|
||||
def test_slot_length
|
||||
assert_equal :> , @method.callable.name
|
||||
assert_equal :>= , @method.callable.name
|
||||
assert_equal 7 , @method.slot_instructions.length
|
||||
end
|
||||
def test_compile
|
||||
assert_equal Risc::MethodCompiler , @method.to_risc.class
|
||||
end
|
||||
def test_risc_length
|
||||
assert_equal 26 , @method.to_risc.risc_instructions.length
|
||||
assert_equal 24 , @method.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user