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.

17 年之前
17 年之前
17 年之前
17 年之前
123456789101112131415161718192021
  1. require 'caca'
  2. class TC_Canvas < Test::Unit::TestCase
  3. def test_list
  4. assert_not_nil(Caca::Font.list)
  5. end
  6. def test_load
  7. Caca::Font.list.each{|f|
  8. font = Caca::Font.new(f)
  9. assert_not_nil(font)
  10. assert_not_nil(font.width)
  11. assert_not_nil(font.height)
  12. assert_not_nil(font.blocks)
  13. }
  14. end
  15. def test_fail_load
  16. assert_raise(RuntimeError) {
  17. Caca::Font.new("This font should not exist")
  18. }
  19. end
  20. end