Copyright (C) 2012 Ruby-GNOME2 Project Team
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# File gobject-introspection/test/test-object-info.rb, line 18 def setup @repository = GObjectIntrospection::Repository.default @repository.require("Gio") @info = @repository.find("Gio", "FileOutputStream") end
# File gobject-introspection/test/test-object-info.rb, line 32 def test_abstract? assert_false(@info.abstract?) end
# File gobject-introspection/test/test-object-info.rb, line 36 def test_fundamental? assert_false(@info.fundamental?) end
# File gobject-introspection/test/test-object-info.rb, line 57 def test_get_field assert_kind_of(GObjectIntrospection::FieldInfo, @info.get_field(0)) end
# File gobject-introspection/test/test-object-info.rb, line 48 def test_get_interface assert_kind_of(GObjectIntrospection::InterfaceInfo, @info.get_interface(0)) end
# File gobject-introspection/test/test-object-info.rb, line 77 def test_get_method_n assert_kind_of(GObjectIntrospection::FunctionInfo, @info.get_method(0)) end
# File gobject-introspection/test/test-object-info.rb, line 82 def test_get_method_name assert_kind_of(GObjectIntrospection::FunctionInfo, @info.get_method("get_etag")) end
# File gobject-introspection/test/test-object-info.rb, line 67 def test_get_property info = @repository.find("Gio", "BufferedOutputStream") assert_kind_of(GObjectIntrospection::PropertyInfo, info.get_property(0)) end
# File gobject-introspection/test/test-object-info.rb, line 92 def test_get_signal info = @repository.find("Gio", "Application") assert_kind_of(GObjectIntrospection::SignalInfo, info.get_signal(0)) end
# File gobject-introspection/test/test-object-info.rb, line 128 def test_get_value_function assert_nil(@info.get_value_function) end
# File gobject-introspection/test/test-object-info.rb, line 102 def test_get_vfunc_n assert_kind_of(GObjectIntrospection::VFuncInfo, @info.get_vfunc(0)) end
# File gobject-introspection/test/test-object-info.rb, line 107 def test_get_vfunc_name assert_kind_of(GObjectIntrospection::VFuncInfo, @info.get_vfunc("can_seek")) end
# File gobject-introspection/test/test-object-info.rb, line 112 def test_n_constants assert_equal(0, @info.n_constants) end
# File gobject-introspection/test/test-object-info.rb, line 53 def test_n_fields assert_equal(2, @info.n_fields) end
# File gobject-introspection/test/test-object-info.rb, line 44 def test_n_interfaces assert_equal(1, @info.n_interfaces) end
# File gobject-introspection/test/test-object-info.rb, line 73 def test_n_methods assert_equal(4, @info.n_methods) end
# File gobject-introspection/test/test-object-info.rb, line 62 def test_n_properties info = @repository.find("Gio", "BufferedOutputStream") assert_equal(2, info.n_properties) end
# File gobject-introspection/test/test-object-info.rb, line 87 def test_n_signals info = @repository.find("Gio", "Application") assert_operator(5, :<=, info.n_signals) end
# File gobject-introspection/test/test-object-info.rb, line 98 def test_n_vfuncs assert_equal(9, @info.n_vfuncs) end
# File gobject-introspection/test/test-object-info.rb, line 40 def test_parent assert_equal("OutputStream", @info.parent.name) end
# File gobject-introspection/test/test-object-info.rb, line 120 def test_ref_function assert_nil(@info.ref_function) end
# File gobject-introspection/test/test-object-info.rb, line 124 def test_set_value_function assert_nil(@info.set_value_function) end
# File gobject-introspection/test/test-object-info.rb, line 28 def test_type_init assert_equal("g_file_output_stream_get_type", @info.type_init) end
# File gobject-introspection/test/test-object-info.rb, line 24 def test_type_name assert_equal("GFileOutputStream", @info.type_name) end
# File gobject-introspection/test/test-object-info.rb, line 116 def test_unref_function assert_nil(@info.unref_function) end