Sha256: 6dc69d9986dad4349fd4b60f1875751d1a71438e5df6b3298d87c1ad15c967d6

Contents?: true

Size: 823 Bytes

Versions: 18

Compression:

Stored size: 823 Bytes

Contents

class TestLayout < Test::Unit::TestCase
  include PangoTestUtils

  def setup
    @context = Pango::Context.new
    @layout = Pango::Layout.new(@context)
  end

  def test_set_font_description
    assert_nil(@layout.font_description)

    @layout.font_description = "sans 14"
    assert_equal("sans 14", @layout.font_description.to_s)

    description = Pango::FontDescription.new("monospace")
    description.size = 10 * Pango::SCALE
    @layout.font_description = description
    assert_equal("monospace 10", @layout.font_description.to_s)
  end

  def test_height
    assert_equal(-1, @layout.height)
  end

  def test_set_height
    new_height = 29 * Pango::SCALE
    @layout.height = new_height
    assert_equal(new_height, @layout.height)
  end

  def test_ellipsized?
    assert_false(@layout.ellipsized?)
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
pango-2.2.5-x64-mingw32 test/test-layout.rb
pango-2.2.5-x86-mingw32 test/test-layout.rb
pango-2.2.5 test/test-layout.rb
pango-2.2.4-x64-mingw32 test/test-layout.rb
pango-2.2.4-x86-mingw32 test/test-layout.rb
pango-2.2.4 test/test-layout.rb
pango-2.2.3-x86-mingw32 test/test-layout.rb
pango-2.2.3 test/test-layout.rb
pango-2.2.2-x86-mingw32 test/test-layout.rb
pango-2.2.2 test/test-layout.rb
pango-2.2.1-x86-mingw32 test/test-layout.rb
pango-2.2.1 test/test-layout.rb
pango-2.2.0-x86-mingw32 test/test-layout.rb
pango-2.2.0 test/test-layout.rb
pango-2.1.0-x86-mingw32 test/test-layout.rb
pango-2.1.0 test/test-layout.rb
pango-2.0.3-x86-mingw32 test/test-layout.rb
pango-2.0.3 test/test-layout.rb