Sha256: 72be88856ca1c8688b0fe944d6d7f154935dbe330dbcab80eb63433485aecdac

Contents?: true

Size: 969 Bytes

Versions: 42

Compression:

Stored size: 969 Bytes

Contents

class TestMiniObject < Test::Unit::TestCase
  def test_create_mini_object
    assert_raise(TypeError) do
      Gst::MiniObject.new
    end

    assert_operator(Gst::MiniObject, :>, Gst::Buffer)
    assert_nothing_raised do
      Gst::Buffer.new
    end
  end

  def test_writable
    mini_object = Gst::Buffer.new
    assert(mini_object.writable?)
    mini_object.flags = :readonly
    assert(!mini_object.writable?)
    mini_object.writable!
    assert(mini_object.writable?)
  end

  def test_flag
    mini_object = Gst::Buffer.new

    assert_equal(0, mini_object.flags)
    assert(!mini_object.flag_raised?(:readonly))

    mini_object.raise_flag(:readonly)
    assert(mini_object.flag_raised?(:readonly))
    mini_object.lower_flag(:readonly)
    assert(!mini_object.flag_raised?(:readonly))

    mini_object.raise_flag(:readonly)
    assert(mini_object.flag_raised?(:readonly))
    mini_object.flags = 0
    assert(!mini_object.flag_raised?(:readonly))
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
gstreamer-1.2.6-x86-mingw32 test/test_mini_object.rb
gstreamer-1.2.6 test/test_mini_object.rb
gstreamer-1.2.5-x86-mingw32 test/test_mini_object.rb
gstreamer-1.2.5 test/test_mini_object.rb
gstreamer-1.2.4-x86-mingw32 test/test_mini_object.rb
gstreamer-1.2.4 test/test_mini_object.rb
gstreamer-1.2.3-x86-mingw32 test/test_mini_object.rb
gstreamer-1.2.3 test/test_mini_object.rb
gstreamer-1.2.2-x86-mingw32 test/test_mini_object.rb
gstreamer-1.2.2 test/test_mini_object.rb
gstreamer-1.2.1-x86-mingw32 test/test_mini_object.rb
gstreamer-1.2.1 test/test_mini_object.rb
gstreamer-1.2.0-x86-mingw32 test/test_mini_object.rb
gstreamer-1.2.0 test/test_mini_object.rb
gstreamer-1.1.9-x86-mingw32 test/test_mini_object.rb
gstreamer-1.1.9 test/test_mini_object.rb
gstreamer-1.1.8-x86-mingw32 test/test_mini_object.rb
gstreamer-1.1.8 test/test_mini_object.rb
gstreamer-1.1.7 test/test_mini_object.rb
gstreamer-1.1.7-x86-mingw32 test/test_mini_object.rb