Browse Source

Add few unit tests for Caca::Display

tags/v0.99.beta14
Pascal Terjan pterjan 17 years ago
parent
commit
433a156fd4
1 changed files with 24 additions and 0 deletions
  1. +24
    -0
      ruby/t/tc_display.rb

+ 24
- 0
ruby/t/tc_display.rb View File

@@ -0,0 +1,24 @@
require 'test/unit'
require 'caca'

class TC_Canvas < Test::Unit::TestCase
def test_create
d = Caca::Display.new
assert_not_nil(d, 'Display creation failed')
end
def test_create_with_driver
d = Caca::Display.new(nil, Caca::Display.driver_list[0])
assert_not_nil(d, 'Display creation failed')
end
def test_create_from_canvas
c = Cucul::Canvas.new(3, 3)
d = Caca::Display.new(c)
assert_not_nil(d, 'Display creation failed')
assert_equal(d.canvas, c, 'Wrong canvas')
end
def test_set_title
c = Cucul::Canvas.new(3, 3)
d = Caca::Display.new(c)
d.title = "Test !"
end
end

Loading…
Cancel
Save