Included Modules

Class/Module Index [+]

Quicksearch

TestGtkBuildable

Public Instance Methods

setup() click to toggle source
# File gtk2/test/test_gtk_buildable.rb, line 4
def setup
  @buildable = Gtk::HBox.new
end
test_add_child() click to toggle source
# File gtk2/test/test_gtk_buildable.rb, line 19
def test_add_child
  only_gtk_version(2, 12, 0)

  assert_equal([], @buildable.children)

  builder = Gtk::Builder.new
  entry = Gtk::Entry.new
  @buildable.add_child(builder, entry)
  assert_equal([entry], @buildable.children)
end
test_construct_child() click to toggle source
# File gtk2/test/test_gtk_buildable.rb, line 41
def test_construct_child
  only_gtk_version(2, 12, 0)

  assert_nil(@buildable.parent)

  @buildable = Gtk::UIManager.new
  @buildable.add_ui(<ui>  <toolbar name='Toolbar'>  </toolbar></ui>)
  builder = Gtk::Builder.new
  assert_kind_of(Gtk::Toolbar, @buildable.construct_child(builder, "Toolbar"))
end
test_get_internal_child() click to toggle source
# File gtk2/test/test_gtk_buildable.rb, line 57
def test_get_internal_child
  only_gtk_version(2, 12, 0)

  assert_nil(@buildable.parent)

  @buildable = Gtk::Dialog.new
  builder = Gtk::Builder.new
  assert_kind_of(Gtk::VBox, @buildable.get_internal_child(builder, "vbox"))
end
test_name() click to toggle source
# File gtk2/test/test_gtk_buildable.rb, line 8
def test_name
  only_gtk_version(2, 12, 0)

  assert_equal("", @buildable.name)
  @buildable.name = "YYY"
  assert_equal("YYY", @buildable.name)

  @buildable.name = nil
  assert_equal("", @buildable.name)
end
test_set_buildable_property() click to toggle source
# File gtk2/test/test_gtk_buildable.rb, line 30
def test_set_buildable_property
  only_gtk_version(2, 12, 0)

  assert_nil(@buildable.parent)

  builder = Gtk::Builder.new
  parent = Gtk::HBox.new
  @buildable.set_buildable_property(builder, "parent", parent)
  assert_equal(parent, @buildable.parent)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.