Sha256: 85931fd58211bb04cd278f4b37cf24f207346448c8811f3f258aa765b0c5f054

Contents?: true

Size: 1.1 KB

Versions: 38

Compression:

Stored size: 1.1 KB

Contents

require 'test/unit'

require 'fox16'

include Fox

class TC_FXFontDesc < Test::Unit::TestCase
  def setup
    @fontdesc = FXFontDesc.new
  end

  def test_face
    @fontdesc.face = "Times New Roman"
    assert_equal("Times New Roman", @fontdesc.face)
  end

  def test_size
    @fontdesc.size = 120
    assert_equal(120, @fontdesc.size)
  end

  def test_weight
    weights = [FXFont::Thin,
               FXFont::ExtraLight,
               FXFont::Light,
               FXFont::Normal,
               FXFont::Medium,
               FXFont::DemiBold,
               FXFont::Bold,
               FXFont::ExtraBold,
               FXFont::Black]
    weights.each do |weight|
      @fontdesc.weight = weight
      assert_equal(weight, @fontdesc.weight)
    end
  end

  def test_slant
    slants = [FXFont::ReverseOblique,
              FXFont::ReverseItalic,
	      FXFont::Straight,
	      FXFont::Italic,
	      FXFont::Oblique]
    slants.each do |slant|
      @fontdesc.slant = slant
      assert_equal(slant, @fontdesc.slant)
    end
  end

  def test_encoding
  end

  def test_setwidth
  end

  def test_flags
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
fxruby-1.6.20-x86-mingw32 test/TC_FXFontDesc.rb
fxruby-1.6.20-x86-linux test/TC_FXFontDesc.rb
fxruby-1.6.20 test/TC_FXFontDesc.rb
fxruby-1.6.20-universal-darwin-10 test/TC_FXFontDesc.rb
fxruby-1.6.19-x86-mingw32 tests/TC_FXFontDesc.rb
fxruby-1.6.14-mswin32 tests/TC_FXFontDesc.rb
fxruby-1.6.13-mswin32 tests/TC_FXFontDesc.rb
fxruby-1.6.0 tests/TC_FXFontDesc.rb
fxruby-1.6.1 tests/TC_FXFontDesc.rb
fxruby-1.6.10 tests/TC_FXFontDesc.rb
fxruby-1.6.11 tests/TC_FXFontDesc.rb
fxruby-1.6.12 tests/TC_FXFontDesc.rb
fxruby-1.6.13 tests/TC_FXFontDesc.rb
fxruby-1.6.14-universal-darwin-9 tests/TC_FXFontDesc.rb
fxruby-1.6.14 tests/TC_FXFontDesc.rb
fxruby-1.6.15-universal-darwin-9 tests/TC_FXFontDesc.rb
fxruby-1.6.15 tests/TC_FXFontDesc.rb
fxruby-1.6.15-x86-mswin32-60 tests/TC_FXFontDesc.rb
fxruby-1.6.16-universal-darwin-9 tests/TC_FXFontDesc.rb
fxruby-1.6.16-x86-mswin32-60 tests/TC_FXFontDesc.rb