[Fxruby-commits] CVS: FXRuby/tests TC_FXFileAssoc.rb,NONE,1.1.2.1 TC_FXFontDesc.rb,NONE,1.1.2.1
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@us...> - 2002-05-24 22:59:27
|
Update of /cvsroot/fxruby/FXRuby/tests In directory usw-pr-cvs1:/tmp/cvs-serv19863 Added Files: Tag: release10 TC_FXFileAssoc.rb TC_FXFontDesc.rb Log Message: --- NEW FILE: TC_FXFileAssoc.rb --- require 'test/unit' require 'fox' include Fox class TC_FXFileAssoc < Test::Unit::TestCase def set_up @app = FXApp.instance || FXApp.new @icon = FXIcon.new(@app) @fileassoc = FXFileAssoc.new end def test_command @fileassoc.command = "netscape" assert_equal("netscape", @fileassoc.command) end def test_extension @fileassoc.extension = ".html" assert_equal(".html", @fileassoc.extension) end def test_mimetype @fileassoc.mimetype = "mimetype" assert_equal("mimetype", @fileassoc.mimetype) end def test_bigicon @fileassoc.bigicon = @icon assert_kind_of(FXIcon, @fileassoc.bigicon) assert_same(@icon, @fileassoc.bigicon) end def test_bigiconopen @fileassoc.bigiconopen = @icon assert_kind_of(FXIcon, @fileassoc.bigiconopen) assert_same(@icon, @fileassoc.bigiconopen) end def test_miniicon @fileassoc.miniicon = @icon assert_kind_of(FXIcon, @fileassoc.miniicon) assert_same(@icon, @fileassoc.miniicon) end def test_miniiconopen @fileassoc.miniiconopen = @icon assert_kind_of(FXIcon, @fileassoc.miniiconopen) assert_same(@icon, @fileassoc.miniiconopen) end def test_dragtype @fileassoc.dragtype = 0 assert_equal(0, @fileassoc.dragtype) end def test_flags @fileassoc.flags = 0 assert_equal(0, @fileassoc.flags) end end --- NEW FILE: TC_FXFontDesc.rb --- require 'test/unit' require 'fox' include Fox class TC_FXFontDesc < Test::Unit::TestCase def set_up @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 = [FONTWEIGHT_DONTCARE, FONTWEIGHT_THIN, FONTWEIGHT_EXTRALIGHT, FONTWEIGHT_LIGHT, FONTWEIGHT_NORMAL, FONTWEIGHT_REGULAR, FONTWEIGHT_MEDIUM, FONTWEIGHT_DEMIBOLD, FONTWEIGHT_BOLD, FONTWEIGHT_EXTRABOLD, FONTWEIGHT_HEAVY, FONTWEIGHT_BLACK] weights.each do |weight| @fontdesc.weight = weight assert_equal(weight, @fontdesc.weight) end end def test_slant slants = [FONTSLANT_DONTCARE, FONTSLANT_REGULAR, FONTSLANT_ITALIC, FONTSLANT_OBLIQUE, FONTSLANT_REVERSE_ITALIC, FONTSLANT_REVERSE_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 |