# File gstreamer/tests/misc.rb, line 301 def test(tc) # Test the padtemplate as a Gst::Object super(tc) # Test direction valid_directions = [ Gst::Pad::DIRECTION_SRC, Gst::Pad::DIRECTION_SINK ] tc.assert_instance_of(Fixnum, dir = direction) tc.assert valid_directions.include?(dir) # Test presence 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) # Test caps 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
Generated with the Darkfish Rdoc Generator 2.