| Revision 2825,
471 bytes
checked in by pterjan, 5 years ago
(diff) |
- No need to require test/unit in each testfile
|
| Line | |
|---|
| 1 | require 'caca' |
|---|
| 2 | |
|---|
| 3 | class TC_Frame < Test::Unit::TestCase |
|---|
| 4 | def setup |
|---|
| 5 | @c = Caca::Canvas.new(3, 3) |
|---|
| 6 | end |
|---|
| 7 | def test_create |
|---|
| 8 | f = @c.create_frame(1) |
|---|
| 9 | assert(f, 'Frame creation failed') |
|---|
| 10 | @c.free_frame(1) |
|---|
| 11 | end |
|---|
| 12 | def test_name |
|---|
| 13 | f = @c.create_frame(1) |
|---|
| 14 | assert(@c.frame_name, 'Failed to get frame name') |
|---|
| 15 | @c.frame_name="test" |
|---|
| 16 | assert(@c.frame_name == "test", 'Failed to set frame name') |
|---|
| 17 | @c.free_frame(1) |
|---|
| 18 | end |
|---|
| 19 | end |
|---|
Note: See
TracBrowser
for help on using the repository browser.