您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920
  1. require 'test/unit'
  2. require 'cucul'
  3. class TC_Frame < Test::Unit::TestCase
  4. def setup
  5. @c = Cucul::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