Browse Source

* Add a first test for Ruby binding

tags/v0.99.beta14
Pascal Terjan pterjan 17 years ago
parent
commit
bb3c148fc2
2 changed files with 24 additions and 0 deletions
  1. +20
    -0
      ruby/cucul/t/tc_frame.rb
  2. +4
    -0
      ruby/cucul/test.rb

+ 20
- 0
ruby/cucul/t/tc_frame.rb View File

@@ -0,0 +1,20 @@
require 'test/unit'
require 'cucul'

class TC_Frame < Test::Unit::TestCase
def setup
@c = Cucul::Canvas.new(3, 3)
end
def test_create
f = @c.create_frame(1)
assert(f, 'Frame creation failed')
@c.free_frame(1)
end
def test_name
f = @c.create_frame(1)
assert(@c.frame_name, 'Failed to get frame name')
@c.frame_name="test"
assert(@c.frame_name == "test", 'Failed to set frame name')
@c.free_frame(1)
end
end

+ 4
- 0
ruby/cucul/test.rb View File

@@ -0,0 +1,4 @@
require 'test/unit'
Dir.glob("t/tc*.rb").each{ |t|
require t
}

Loading…
Cancel
Save