rubyx/test/vool/to_mom/send/simple_send_harness.rb
Torsten Ruger 3247c2036c moving from collect to each
when iterating over tree.
Much cleaner, less hokuspukus methods that are noops

Mom is coming back out, but not linked yet
2018-03-15 17:22:56 +05:30

32 lines
941 B
Ruby

module Vool
# relies on @stats and receiver_type method
module SimpleSendHarness
def test_compiles_not_array
assert Array != @stats.class , @stats
end
def test_class_compiles
assert_equal Mom::MessageSetup , @stats.class , @stats
end
def test_two_instructions_are_returned
assert_equal 3 , @stats.length , @stats.to_rxf
end
def test_receiver_move_class
assert_equal Mom::ArgumentTransfer, @stats[1].class
end
def test_receiver_move
assert_equal :receiver, @stats[1].receiver.left.slots[1]
end
def test_receiver
type , value = receiver
assert_equal type, @stats[1].receiver.right.class
assert_equal value, @stats[1].receiver.right.value
end
def test_call_is
assert_equal Mom::SimpleCall, @stats[2].class
end
def test_call_has_method
assert_equal Parfait::TypedMethod, @stats[2].method.class
end
end
end