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