Sha256: f58a575cd71c6d33106cfd0f8c0d5d609ee05a13a2cf2a54886c97bd159b4689
Contents?: true
Size: 548 Bytes
Versions: 13
Compression:
Stored size: 548 Bytes
Contents
# -*- coding: utf-8 -*- require_relative 'helper' class TestFont < Test::Unit::TestCase def font(*args) Rays::Font.new(*args) end def test_name() assert_kind_of String, font.name end def test_size() assert_kind_of Numeric, font.size assert_equal 32, font(nil, 32).size end def test_width() assert_equal 0, font.width('') w = font.width 'X' assert_equal w * 2, font.width('XX') end def test_height() f = font assert_equal f.height, f.ascent + f.descent + f.leading end end# TestFont
Version data entries
13 entries across 13 versions & 1 rubygems