tc_font.rb (libcaca-0.99.beta19) | : | tc_font.rb (libcaca-0.99.beta20.tar.bz2) | ||
---|---|---|---|---|
require 'caca' | require 'caca' | |||
class TC_Canvas < Test::Unit::TestCase | class TC_Canvas < MiniTest::Test | |||
def test_list | def test_list | |||
assert_not_nil(Caca::Font.list) | refute_nil(Caca::Font.list) | |||
end | end | |||
def test_load | def test_load | |||
Caca::Font.list.each{|f| | Caca::Font.list.each{|f| | |||
font = Caca::Font.new(f) | font = Caca::Font.new(f) | |||
assert_not_nil(font) | refute_nil(font) | |||
assert_not_nil(font.width) | refute_nil(font.width) | |||
assert_not_nil(font.height) | refute_nil(font.height) | |||
assert_not_nil(font.blocks) | refute_nil(font.blocks) | |||
} | } | |||
end | end | |||
def test_fail_load | def test_fail_load | |||
assert_raise(RuntimeError) { | assert_raises(RuntimeError) { | |||
Caca::Font.new("This font should not exist") | Caca::Font.new("This font should not exist") | |||
} | } | |||
end | end | |||
end | end | |||
End of changes. 4 change blocks. | ||||
12 lines changed or deleted | 12 lines changed or added |