Sha256: 75a341f42d323eca65a0d6fd35dbb4172bcbcb8ba31b18f794fdda4709378755

Contents?: true

Size: 842 Bytes

Versions: 105

Compression:

Stored size: 842 Bytes

Contents

require 'cairo'

class TextClusterTest < Test::Unit::TestCase
  include CairoTestUtils

  def test_new
    only_cairo_version(1, 7, 2)

    cluster = Cairo::TextCluster.new(2, 3)
    assert_equal([2, 3], [cluster.num_bytes, cluster.num_glyphs])
    assert_equal("#<Cairo::TextCluster: num_bytes=2, num_glyphs=3>",
                 cluster.to_s)
  end

  def test_accessor
    only_cairo_version(1, 7, 2)

    cluster = Cairo::TextCluster.new(5, 7)
    assert_equal([5, 7], [cluster.num_bytes, cluster.num_glyphs])
    cluster.num_bytes = 1
    cluster.num_glyphs = 2
    assert_equal([1, 2], [cluster.num_bytes, cluster.num_glyphs])
  end

  def test_to_s
    only_cairo_version(1, 7, 2)

    cluster = Cairo::TextCluster.new(9, 1)
    assert_equal("#<Cairo::TextCluster: num_bytes=9, num_glyphs=1>",
                 cluster.to_s)
  end
end

Version data entries

105 entries across 97 versions & 2 rubygems

Version Path
cairo-1.15.13-x64-mingw32 test/test_text_cluster.rb
cairo-1.15.13-x86-mingw32 test/test_text_cluster.rb
cairo-1.15.13 test/test_text_cluster.rb
cairo-1.15.12-x64-mingw32 test/test_text_cluster.rb
cairo-1.15.12-x86-mingw32 test/test_text_cluster.rb
cairo-1.15.12 test/test_text_cluster.rb
cairo-1.15.11-x64-mingw32 test/test_text_cluster.rb
cairo-1.15.11-x86-mingw32 test/test_text_cluster.rb
cairo-1.15.11 test/test_text_cluster.rb
cairo-1.15.10-x86-mingw32 test/test_text_cluster.rb
cairo-1.15.10-x64-mingw32 test/test_text_cluster.rb
cairo-1.15.10 test/test_text_cluster.rb
cairo-1.15.9-x64-mingw32 test/test_text_cluster.rb
cairo-1.15.9 test/test_text_cluster.rb
cairo-1.15.9-x86-mingw32 test/test_text_cluster.rb
cairo-1.15.8-x86-mingw32 test/test_text_cluster.rb
cairo-1.15.8-x64-mingw32 test/test_text_cluster.rb
cairo-1.15.8 test/test_text_cluster.rb
cairo-1.15.7-x64-mingw32 test/test_text_cluster.rb
cairo-1.15.7-x86-mingw32 test/test_text_cluster.rb