Sha256: 7322d1ecd47c800dcd7182a97cfa4196bd5bc557738ebfb9cb6c9bd2cc362af0
Contents?: true
Size: 552 Bytes
Versions: 6
Compression:
Stored size: 552 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
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
rays-0.1.21 | test/test_font.rb |
rays-0.1.20 | test/test_font.rb |
rays-0.1.19 | test/test_font.rb |
rays-0.1.18 | test/test_font.rb |
rays-0.1.17 | test/test_font.rb |
rays-0.1.16 | test/test_font.rb |