You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tc_font.rb 448 B

17 years ago
12345678910111213141516171819202122
  1. require 'test/unit'
  2. require 'cucul'
  3. class TC_Canvas < Test::Unit::TestCase
  4. def test_list
  5. assert_not_nil(Cucul::Font.list)
  6. end
  7. def test_load
  8. Cucul::Font.list.each{|f|
  9. font = Cucul::Font.new(f)
  10. assert_not_nil(font)
  11. assert_not_nil(font.width)
  12. assert_not_nil(font.height)
  13. assert_not_nil(font.blocks)
  14. }
  15. end
  16. def test_fail_load
  17. assert_raise(RuntimeError) {
  18. Cucul::Font.new("This font should not exist")
  19. }
  20. end
  21. end