source: libcaca/trunk/ruby/t/tc_display.rb @ 2297

Last change on this file since 2297 was 2297, checked in by Pascal Terjan, 12 years ago

Add few unit tests for Caca::Display

File size: 659 bytes
Line 
1require 'test/unit'
2require 'caca'
3
4class TC_Canvas < Test::Unit::TestCase
5    def test_create
6        d = Caca::Display.new
7        assert_not_nil(d, 'Display creation failed')
8    end
9    def test_create_with_driver
10        d = Caca::Display.new(nil, Caca::Display.driver_list[0])
11        assert_not_nil(d, 'Display creation failed')
12    end
13    def test_create_from_canvas
14        c = Cucul::Canvas.new(3, 3)
15        d = Caca::Display.new(c)
16        assert_not_nil(d, 'Display creation failed')
17        assert_equal(d.canvas, c, 'Wrong canvas')
18    end
19    def test_set_title
20        c = Cucul::Canvas.new(3, 3)
21        d = Caca::Display.new(c)
22        d.title = "Test !"
23    end
24end
Note: See TracBrowser for help on using the repository browser.