def test(tc)
super(tc)
valid_directions = [
Gst::Pad::DIRECTION_SRC,
Gst::Pad::DIRECTION_SINK
]
tc.assert_instance_of(Fixnum, dir = direction)
tc.assert valid_directions.include?(dir)
valid_presences = [
Gst::Pad::PRESENCE_ALWAYS,
Gst::Pad::PRESENCE_SOMETIMES,
Gst::Pad::PRESENCE_REQUEST
]
tc.assert_instance_of(Fixnum, pres = presence)
tc.assert valid_presences.include?(pres)
tc.assert_bool b = has_caps?
i = 0
each_caps { |cap| cap.test(tc); i += 1 }
tc.assert_instance_of(Array, a = caps)
tc.assert_equal(a.size, i)
a.each { |cap| cap.test(tc) }
tc.assert i > 0 if b
end