2017-09-11 20:30:28 +02:00
|
|
|
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.first.class , @stats
|
|
|
|
end
|
|
|
|
def test_two_instructions_are_returned
|
|
|
|
assert_equal 3 , @stats.length
|
|
|
|
end
|
|
|
|
def test_receiver_move_class
|
|
|
|
assert_equal Mom::ArgumentTransfer, @stats[1].class
|
|
|
|
end
|
|
|
|
def test_receiver_move
|
2018-03-10 13:34:04 +01:00
|
|
|
assert_equal :receiver, @stats[1].receiver.left.slots[1]
|
2017-09-11 20:30:28 +02:00
|
|
|
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
|