gir_ffi 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +11 -0
- data/README.rdoc +28 -14
- data/Rakefile +1 -1
- data/TODO.rdoc +3 -24
- data/examples/05_notification.rb +35 -0
- data/lib/gir_ffi/arg_helper.rb +15 -279
- data/lib/gir_ffi/builder/argument/base.rb +110 -0
- data/lib/gir_ffi/builder/argument/hash_table_base.rb +20 -0
- data/lib/gir_ffi/builder/argument/in_base.rb +19 -0
- data/lib/gir_ffi/builder/argument/in_out_base.rb +25 -0
- data/lib/gir_ffi/builder/argument/list_base.rb +16 -0
- data/lib/gir_ffi/builder/argument/out_base.rb +27 -0
- data/lib/gir_ffi/builder/argument.rb +167 -357
- data/lib/gir_ffi/builder/function.rb +2 -0
- data/lib/gir_ffi/builder/module.rb +2 -2
- data/lib/gir_ffi/builder/type/base.rb +7 -0
- data/lib/gir_ffi/builder/type/callback.rb +1 -8
- data/lib/gir_ffi/builder/type/constant.rb +1 -6
- data/lib/gir_ffi/builder/type/enum.rb +2 -7
- data/lib/gir_ffi/builder/type/interface.rb +12 -14
- data/lib/gir_ffi/builder/type/object.rb +32 -13
- data/lib/gir_ffi/builder/type/registered_type.rb +1 -78
- data/lib/gir_ffi/builder/type/struct.rb +2 -0
- data/lib/gir_ffi/builder/type/struct_based.rb +9 -24
- data/lib/gir_ffi/builder/type/unintrospectable.rb +63 -0
- data/lib/gir_ffi/builder/type/union.rb +8 -7
- data/lib/gir_ffi/builder/type/with_layout.rb +43 -0
- data/lib/gir_ffi/builder/type/with_methods.rb +61 -0
- data/lib/gir_ffi/builder.rb +39 -0
- data/lib/gir_ffi/callback_helper.rb +58 -0
- data/lib/gir_ffi/class_base.rb +17 -5
- data/lib/gir_ffi/i_repository.rb +0 -4
- data/lib/gir_ffi/in_out_pointer.rb +76 -0
- data/lib/gir_ffi/in_pointer.rb +46 -0
- data/lib/gir_ffi/interface_base.rb +12 -0
- data/lib/gir_ffi/module_base.rb +7 -3
- data/lib/gir_ffi/overrides/glib.rb +14 -3
- data/lib/gir_ffi/overrides/gobject.rb +37 -15
- data/lib/gir_ffi/overrides/gtk.rb +1 -1
- data/lib/gir_ffi/version.rb +1 -1
- data/lib/gir_ffi.rb +3 -0
- data/tasks/rdoc.rake +6 -0
- data/tasks/test.rake +22 -3
- data/tasks/yardoc.rake +6 -0
- data/test/arg_helper_test.rb +2 -72
- data/test/builder_test.rb +15 -19
- data/test/function_definition_builder_test.rb +30 -37
- data/test/g_object_overrides_test.rb +29 -1
- data/test/glib_overrides_test.rb +4 -0
- data/test/gtk_overrides_test.rb +21 -15
- data/test/i_repository_test.rb +2 -1
- data/test/{generated_gimarshallingtests_test.rb → integration/generated_gimarshallingtests_test.rb} +1 -1
- data/test/integration/generated_gio_test.rb +98 -0
- data/test/integration/generated_gobject_test.rb +30 -0
- data/test/{generated_gtk_test.rb → integration/generated_gtk_test.rb} +5 -5
- data/test/{generated_regress_test.rb → integration/generated_regress_test.rb} +19 -5
- data/test/interface_type_builder_test.rb +1 -1
- data/test/module_builder_test.rb +3 -3
- data/test/test_helper.rb +4 -9
- data/test/type_builder_test.rb +5 -5
- data/test/{dynamic_type_builder_test.rb → unintrospectable_type_builder_test.rb} +12 -8
- data/test/unit/builder_test.rb +31 -0
- data/test/unit/callback_helper_test.rb +19 -0
- data/test/unit/constant_builder_test.rb +5 -0
- data/test/unit/i_constant_info_test.rb +17 -0
- data/test/unit/in_out_pointer_test.rb +118 -0
- data/test/unit/in_pointer_test.rb +69 -0
- data/test/unit/object_type_builder_test.rb +20 -0
- metadata +47 -19
- data/lib/gir_ffi/builder/dynamic_type.rb +0 -41
- data/test/generated_gio_test.rb +0 -39
- data/test/generated_gobject_test.rb +0 -15
- data/test/object_type_builder_test.rb +0 -34
@@ -1,34 +0,0 @@
|
|
1
|
-
require File.expand_path('test_helper.rb', File.dirname(__FILE__))
|
2
|
-
|
3
|
-
describe GirFFI::Builder::Type::Object do
|
4
|
-
describe "building GObject::TypeModule, which implements an interface" do
|
5
|
-
before do
|
6
|
-
info = get_function_introspection_data 'GObject', 'TypeModule'
|
7
|
-
@bldr = GirFFI::Builder::Type::Object.new info
|
8
|
-
end
|
9
|
-
|
10
|
-
it "mixes the interface into the generated class" do
|
11
|
-
klass = @bldr.build_class
|
12
|
-
assert_includes klass.ancestors, GObject::TypePlugin
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe "building the CharsetConverter class" do
|
17
|
-
before do
|
18
|
-
GirFFI.setup :Gio
|
19
|
-
end
|
20
|
-
|
21
|
-
it "includes two interfaces" do
|
22
|
-
klass = Gio::CharsetConverter
|
23
|
-
assert_includes klass.ancestors, Gio::Converter
|
24
|
-
assert_includes klass.ancestors, Gio::Initable
|
25
|
-
end
|
26
|
-
|
27
|
-
it "allows an instance to find the #reset method" do
|
28
|
-
cnv = Gio::CharsetConverter.new "utf8", "utf8"
|
29
|
-
cnv.reset
|
30
|
-
pass
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|