File: tc_font.rb

package info (click to toggle)
libcaca 0.99.beta14-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 6,720 kB
  • ctags: 2,334
  • sloc: ansic: 18,652; cs: 1,171; objc: 835; cpp: 741; makefile: 446; sh: 289; python: 215; ruby: 190; asm: 93
file content (22 lines) | stat: -rw-r--r-- 448 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'test/unit'
require 'cucul'

class TC_Canvas < Test::Unit::TestCase
    def test_list
	assert_not_nil(Cucul::Font.list)
    end
    def test_load
	Cucul::Font.list.each{|f|
		font = Cucul::Font.new(f)
		assert_not_nil(font)
		assert_not_nil(font.width)
		assert_not_nil(font.height)
		assert_not_nil(font.blocks)
	}
    end
    def test_fail_load
	assert_raise(RuntimeError) {
		Cucul::Font.new("This font should not exist")
	}
    end
end