Class/Module Index [+]

Quicksearch

TestValue

Public Instance Methods

test_fourcc() click to toggle source
# File gstreamer/test/test_value.rb, line 24
def test_fourcc
  fourcc = Gst::Fourcc.new("MJPG")
  assert_equal(string_to_fourcc("MJPG"), fourcc.to_i)
  assert_equal("MJPG", fourcc.to_s)

  fourcc.replace!(string_to_fourcc("abcd"))
  assert_equal(string_to_fourcc("abcd"), fourcc.to_i)
  assert_equal("abcd", fourcc.to_s)
end
test_fraction_range() click to toggle source
# File gstreamer/test/test_value.rb, line 39
def test_fraction_range
  assert_equal([Rational(0, 1), Rational(2147483647, 1)],
               ffmpeg_color_space_caps[0]["framerate"].to_a)
end
test_fraction_range_new() click to toggle source
# File gstreamer/test/test_value.rb, line 34
def test_fraction_range_new
  assert_equal("[ 1/2, 3/4 ]",
               Gst::FractionRange.new(Rational(1, 2), Rational(3, 4)).to_s)
end
test_int_range() click to toggle source
# File gstreamer/test/test_value.rb, line 6
def test_int_range
  range = Gst::IntRange.new(10, 100)
  assert_equal(10, range.min)
  assert_equal(100, range.max)
  assert_equal("[10,100]", range.to_s)

  range.min = 1
  range.max = 500
  assert_equal(1, range.min)
  assert_equal(500, range.max)
  assert_equal("[1,500]", range.to_s)

  range.set(100, 9999)
  assert_equal(100, range.min)
  assert_equal(9999, range.max)
  assert_equal("[100,9999]", range.to_s)
end
test_list() click to toggle source
# File gstreamer/test/test_value.rb, line 2
def test_list
  assert_equal([1234, 4321], audio_convert_caps[0]["endianness"])
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.