This repository has been archived on 2021-09-15 . You can view files and clone it, but cannot push or open issues or pull requests.
33 lines
683 B
Ruby
33 lines
683 B
Ruby
class TestGtkWidget < Test::Unit::TestCase
|
|||
include GtkTestUtils
|
|||
|
|||
def setup
|
|||
@widget = Gtk::Invisible.new
|
|||
end
|
|||
|
|||
def test_set_window
|
|||
attrs = Gdk::WindowAttr.new(100, 100, :only, :temp)
|
|||
window = Gdk::Window.new(nil, attrs, 0)
|
|||
@widget.window = window
|
|||
assert_equal(window, @widget.window)
|
|||
end
|
|||
|
|||
def test_modify_color_component_with_nil_color
|
|||
assert_nothing_raised do
|
|||
@widget.modify_base(:normal, nil)
|
|||
end
|
|||
|
|||
assert_nothing_raised do
|
|||
@widget.modify_text(:normal, nil)
|
|||
end
|
|||
|
|||
assert_nothing_raised do
|
|||
@widget.modify_fg(:normal, nil)
|
|||
end
|
|||
|
|||
assert_nothing_raised do
|
|||
@widget.modify_bg(:normal, nil)
|
|||
end
|
|||
end
|
|||
end
|