Class: TestSglButton
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- TestSglButton
- Defined in:
- lib/sgl/sgl-button.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#test_button ⇒ Object
111 112 113 114 115 116 |
# File 'lib/sgl/sgl-button.rb', line 111 def b = Button.new(1, 2) assert_equal(1, b.x) assert_equal(2, b.y) assert_equal([1, 2], b.pos) end |
#test_draw ⇒ Object
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/sgl/sgl-button.rb', line 118 def test_draw app = SGL::Application.new app.set_setup { app.window(100, 100) app.runtime = 0.1 } i = 0 = Button.new(0, 0) app.set_display { .move_to(i, i) .draw(i) i += 5 i = 0 if 100 < i } app.mainloop end |