def test(tc)
super(tc)
tc.assert_instance_of(String, name)
valid_directions = [
Gst::Pad::DIRECTION_SRC,
Gst::Pad::DIRECTION_SINK
]
tc.assert_instance_of(Fixnum, dir = direction)
tc.assert valid_directions.include?(dir)
if pt = pad_template
tc.assert_instance_of(Gst::PadTemplate, pt)
pt.test(tc)
end
i = 0
each_format { |f| f.test(tc); i += 1 }
tc.assert_instance_of(Array, a = formats)
tc.assert a.length == i
tc.assert_bool b = provides_formats?
tc.assert a.length == 0 unless b
a.each { |f| f.test(tc) }
i = 0
each_query_type { |f| f.test(tc); i += 1 }
tc.assert_instance_of(Array, a = query_types)
tc.assert_equal(a.length, i)
tc.assert_bool b = provides_query_types?
tc.assert_equal(a.length, 0) unless b
a.each { |f| f.test(tc) }
flags = {
disabled? => Gst::Pad::FLAG_DISABLED,
negotiating? => Gst::Pad::FLAG_NEGOTIATING
}
test_flags(tc, flags)
end