fix all mom tests
still quite brittle, but easy to fix
This commit is contained in:
@ -11,7 +11,7 @@ module Mom
|
||||
assert_equal Risc::MethodCompiler , @method.to_risc.class
|
||||
end
|
||||
def test_risc_length
|
||||
assert_equal 66 , @method.to_risc.risc_instructions.length
|
||||
assert_equal 67 , @method.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -9,9 +9,10 @@ module Mom
|
||||
end
|
||||
def test_compile
|
||||
assert_equal Risc::MethodCompiler , @method.to_risc.class
|
||||
assert_equal :div4 , @method.callable.name
|
||||
end
|
||||
def test_risc_length
|
||||
assert_equal 37 , @method.to_risc.risc_instructions.length
|
||||
assert_equal 38 , @method.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -11,7 +11,7 @@ module Mom
|
||||
assert_equal Risc::MethodCompiler , @method.to_risc.class
|
||||
end
|
||||
def test_risc_length
|
||||
assert_equal 36 , @method.to_risc.risc_instructions.length
|
||||
assert_equal 37 , @method.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -11,7 +11,7 @@ module Mom
|
||||
assert_equal Risc::MethodCompiler , @method.to_risc.class
|
||||
end
|
||||
def test_risc_length
|
||||
assert_equal 37 , @method.to_risc.risc_instructions.length
|
||||
assert_equal 38 , @method.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -11,7 +11,7 @@ module Mom
|
||||
assert_equal Risc::MethodCompiler , @method.to_risc.class
|
||||
end
|
||||
def test_risc_length
|
||||
assert_equal 27 , @method.to_risc.risc_instructions.length
|
||||
assert_equal 19 , @method.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -11,7 +11,7 @@ module Mom
|
||||
assert_equal Risc::MethodCompiler , @method.to_risc.class
|
||||
end
|
||||
def test_risc_length
|
||||
assert_equal 38 , @method.to_risc.risc_instructions.length
|
||||
assert_equal 39 , @method.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -13,6 +13,9 @@ module Mom
|
||||
def test_mom_length
|
||||
assert_equal 5 , @method.mom_instructions.length
|
||||
end
|
||||
def test_return
|
||||
assert_equal ReturnSequence , @method.mom_instructions.next(3).class
|
||||
end
|
||||
end
|
||||
class TestObjectSet < BootTest
|
||||
def setup
|
||||
@ -59,7 +62,7 @@ module Mom
|
||||
assert_equal Mom::MethodCompiler , @method.class
|
||||
end
|
||||
def test_mom_length
|
||||
assert_equal 5 , @method.mom_instructions.length
|
||||
assert_equal 2 , @method.mom_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -19,7 +19,7 @@ module Mom
|
||||
end
|
||||
def test_risc_length
|
||||
each_method do |method|
|
||||
assert_equal 38 , method.to_risc.risc_instructions.length
|
||||
assert_equal 39 , method.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -11,7 +11,7 @@ module Mom
|
||||
assert_equal Risc::MethodCompiler , @method.to_risc.class
|
||||
end
|
||||
def test_risc_length
|
||||
assert_equal 40 , @method.to_risc.risc_instructions.length
|
||||
assert_equal 41 , @method.to_risc.risc_instructions.length
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user