Sha256: f06f3233da2916eb23f53c9656ca8dd4a4358b8982a547a713991c314ba3d7e5

Contents?: true

Size: 834 Bytes

Versions: 24

Compression:

Stored size: 834 Bytes

Contents

require 'cairo'

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

  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

24 entries across 24 versions & 1 rubygems

Version Path
cairo-1.17.13 test/test_text_cluster.rb
cairo-1.17.12 test/test_text_cluster.rb
cairo-1.17.11 test/test_text_cluster.rb
cairo-1.17.10 test/test_text_cluster.rb
cairo-1.17.9 test/test_text_cluster.rb
cairo-1.17.8 test/test_text_cluster.rb
cairo-1.17.7 test/test_text_cluster.rb
cairo-1.17.6 test/test_text_cluster.rb
cairo-1.17.5 test/test_text_cluster.rb
cairo-1.17.4 test/test_text_cluster.rb
cairo-1.16.6 test/test_text_cluster.rb
cairo-1.16.5 test/test_text_cluster.rb
cairo-1.16.4 test/test_text_cluster.rb
cairo-1.16.3 test/test_text_cluster.rb
cairo-1.16.2 test/test_text_cluster.rb
cairo-1.16.1-x86-mingw32 test/test_text_cluster.rb
cairo-1.16.1-x64-mingw32 test/test_text_cluster.rb
cairo-1.16.1 test/test_text_cluster.rb
cairo-1.16.0-x86-mingw32 test/test_text_cluster.rb
cairo-1.16.0-x64-mingw32 test/test_text_cluster.rb