rubyx/test/mom/builtin/test_operator.rb
Torsten Rüger c13d4fb017 Make builtin tests more stand alone
not relying on the whole boot process
easier to test basic when broken (like now)
2019-08-22 17:52:19 +03:00

28 lines
614 B
Ruby

require_relative "helper"
module Mom
module Builtin
class TestIntOperatorsRisc < BootTest
def setup
super
end
def each_method &block
Risc.operators.each do |name|
method = get_operator_compiler(name)
block.yield(method)
end
end
def test_compile
each_method do |method|
assert_equal Risc::MethodCompiler , method.to_risc.class
end
end
def test_risc_length
each_method do |method|
assert_equal 48 , method.to_risc.risc_instructions.length
end
end
end
end
end