gir_ffi 0.7.7 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changelog.md +9 -0
- data/lib/ffi-glib/array.rb +1 -1
- data/lib/ffi-glib/error.rb +1 -2
- data/lib/ffi-glib/hash_table.rb +2 -2
- data/lib/ffi-glib/variant.rb +1 -1
- data/lib/ffi-gobject/base.rb +23 -23
- data/lib/ffi-gobject/object.rb +7 -3
- data/lib/ffi-gobject/value.rb +6 -1
- data/lib/ffi-gobject.rb +9 -6
- data/lib/ffi-gobject_introspection/i_base_info.rb +3 -3
- data/lib/ffi-gobject_introspection/i_constant_info.rb +1 -1
- data/lib/ffi-gobject_introspection/i_repository.rb +4 -1
- data/lib/ffi-gobject_introspection/i_type_info.rb +1 -1
- data/lib/ffi-gobject_introspection/i_unresolved_info.rb +7 -0
- data/lib/ffi-gobject_introspection/lib.rb +1 -1
- data/lib/gir_ffi/builders/argument_builder.rb +1 -1
- data/lib/gir_ffi/builders/c_to_ruby_convertor.rb +37 -29
- data/lib/gir_ffi/builders/callback_argument_builder.rb +57 -27
- data/lib/gir_ffi/builders/closure_convertor.rb +12 -8
- data/lib/gir_ffi/builders/closure_to_pointer_convertor.rb +12 -8
- data/lib/gir_ffi/builders/constructor_result_convertor.rb +11 -7
- data/lib/gir_ffi/builders/field_builder.rb +1 -1
- data/lib/gir_ffi/builders/function_builder.rb +1 -1
- data/lib/gir_ffi/builders/mapping_method_builder.rb +1 -1
- data/lib/gir_ffi/builders/marshalling_method_builder.rb +2 -2
- data/lib/gir_ffi/builders/method_template.rb +1 -1
- data/lib/gir_ffi/builders/null_convertor.rb +11 -7
- data/lib/gir_ffi/builders/property_builder.rb +1 -1
- data/lib/gir_ffi/builders/ruby_to_c_convertor.rb +17 -13
- data/lib/gir_ffi/error_argument_info.rb +1 -1
- data/lib/gir_ffi/ffi_ext/pointer.rb +1 -1
- data/lib/gir_ffi/info_ext/i_unresolved_info.rb +12 -0
- data/lib/gir_ffi/info_ext/safe_constant_name.rb +2 -2
- data/lib/gir_ffi/info_ext/safe_function_name.rb +1 -1
- data/lib/gir_ffi/info_ext.rb +1 -0
- data/lib/gir_ffi/module_base.rb +1 -1
- data/lib/gir_ffi/receiver_argument_info.rb +15 -12
- data/lib/gir_ffi/user_data_argument_info.rb +17 -15
- data/lib/gir_ffi/user_data_type_info.rb +14 -12
- data/lib/gir_ffi/version.rb +1 -1
- data/lib/gir_ffi-base/gobject/lib.rb +1 -1
- data/test/base_test_helper.rb +15 -15
- data/test/ffi-glib/array_test.rb +38 -38
- data/test/ffi-glib/byte_array_test.rb +6 -7
- data/test/ffi-glib/bytes_test.rb +9 -9
- data/test/ffi-glib/hash_table_test.rb +26 -23
- data/test/ffi-glib/iconv_test.rb +5 -5
- data/test/ffi-glib/list_test.rb +16 -16
- data/test/ffi-glib/main_loop_test.rb +6 -6
- data/test/ffi-glib/ptr_array_test.rb +45 -45
- data/test/ffi-glib/ruby_closure_test.rb +6 -6
- data/test/ffi-glib/s_list_test.rb +15 -15
- data/test/ffi-glib/strv_test.rb +21 -21
- data/test/ffi-glib/variant_test.rb +4 -4
- data/test/ffi-gobject/gobject_test.rb +35 -35
- data/test/ffi-gobject/object_class_test.rb +1 -1
- data/test/ffi-gobject/object_test.rb +29 -6
- data/test/ffi-gobject/value_test.rb +66 -52
- data/test/ffi-gobject_introspection/i_base_info_test.rb +10 -11
- data/test/ffi-gobject_introspection/i_constant_info_test.rb +6 -6
- data/test/ffi-gobject_introspection/i_enum_info_test.rb +4 -5
- data/test/ffi-gobject_introspection/i_function_info_test.rb +0 -2
- data/test/ffi-gobject_introspection/i_object_info_test.rb +5 -5
- data/test/ffi-gobject_introspection/i_registered_type_info_test.rb +9 -8
- data/test/ffi-gobject_introspection/i_repository_test.rb +16 -16
- data/test/ffi-gobject_introspection/i_type_info_test.rb +16 -2
- data/test/ffi-gobject_introspection/lib_test.rb +2 -2
- data/test/ffi-gobject_test.rb +50 -40
- data/test/gir_ffi/arg_helper_test.rb +5 -5
- data/test/gir_ffi/builder_test.rb +41 -41
- data/test/gir_ffi/builders/argument_builder_test.rb +240 -207
- data/test/gir_ffi/builders/base_argument_builder_test.rb +0 -1
- data/test/gir_ffi/builders/callback_argument_builder_test.rb +81 -15
- data/test/gir_ffi/builders/callback_builder_test.rb +39 -14
- data/test/gir_ffi/builders/callback_return_value_builder_test.rb +41 -33
- data/test/gir_ffi/builders/enum_builder_test.rb +3 -3
- data/test/gir_ffi/builders/field_builder_test.rb +17 -17
- data/test/gir_ffi/builders/function_builder_test.rb +16 -16
- data/test/gir_ffi/builders/interface_builder_test.rb +9 -7
- data/test/gir_ffi/builders/module_builder_test.rb +5 -6
- data/test/gir_ffi/builders/object_builder_test.rb +24 -19
- data/test/gir_ffi/builders/property_builder_test.rb +25 -23
- data/test/gir_ffi/builders/registered_type_builder_test.rb +11 -11
- data/test/gir_ffi/builders/return_value_builder_test.rb +237 -197
- data/test/gir_ffi/builders/signal_closure_builder_test.rb +29 -22
- data/test/gir_ffi/builders/struct_builder_test.rb +10 -10
- data/test/gir_ffi/builders/unintrospectable_builder_test.rb +8 -8
- data/test/gir_ffi/builders/union_builder_test.rb +5 -6
- data/test/gir_ffi/builders/user_defined_builder_test.rb +42 -33
- data/test/gir_ffi/builders/vfunc_builder_test.rb +37 -30
- data/test/gir_ffi/callback_base_test.rb +4 -5
- data/test/gir_ffi/class_base_test.rb +35 -28
- data/test/gir_ffi/error_type_info_test.rb +14 -14
- data/test/gir_ffi/ffi_ext/pointer_test.rb +4 -4
- data/test/gir_ffi/g_type_test.rb +6 -6
- data/test/gir_ffi/in_out_pointer_test.rb +27 -27
- data/test/gir_ffi/in_pointer_test.rb +54 -50
- data/test/gir_ffi/info_ext/i_callable_info_test.rb +8 -7
- data/test/gir_ffi/info_ext/i_callback_info_test.rb +7 -7
- data/test/gir_ffi/info_ext/i_field_info_test.rb +10 -8
- data/test/gir_ffi/info_ext/i_function_info_test.rb +17 -15
- data/test/gir_ffi/info_ext/i_signal_info_test.rb +10 -8
- data/test/gir_ffi/info_ext/i_type_info_test.rb +158 -155
- data/test/gir_ffi/info_ext/i_unresolved_info_test.rb +17 -0
- data/test/gir_ffi/info_ext/safe_constant_name_test.rb +12 -10
- data/test/gir_ffi/info_ext/safe_function_name_test.rb +12 -10
- data/test/gir_ffi/interface_base_test.rb +6 -6
- data/test/gir_ffi/method_stubber_test.rb +16 -13
- data/test/gir_ffi/object_base_test.rb +6 -6
- data/test/gir_ffi/sized_array_test.rb +23 -23
- data/test/gir_ffi/type_map_test.rb +3 -3
- data/test/gir_ffi/unintrospectable_type_info_test.rb +18 -18
- data/test/gir_ffi/user_defined_property_info_test.rb +4 -4
- data/test/gir_ffi/user_defined_type_info_test.rb +16 -16
- data/test/gir_ffi/variable_name_generator_test.rb +6 -6
- data/test/gir_ffi/version_test.rb +1 -1
- data/test/gir_ffi/zero_terminated_test.rb +16 -17
- data/test/gir_ffi-base/glib/boolean_test.rb +13 -13
- data/test/gir_ffi-base/glib/strv_test.rb +11 -11
- data/test/gir_ffi_test.rb +18 -18
- data/test/gir_ffi_test_helper.rb +13 -18
- data/test/integration/derived_classes_test.rb +8 -8
- data/test/integration/generated_gimarshallingtests_test.rb +794 -792
- data/test/integration/generated_gio_test.rb +25 -26
- data/test/integration/generated_glib_test.rb +8 -2
- data/test/integration/generated_gobject_test.rb +16 -9
- data/test/integration/generated_pango_ft2_test.rb +1 -2
- data/test/integration/generated_pango_test.rb +2 -2
- data/test/integration/generated_regress_test.rb +785 -705
- data/test/integration/generated_secret_test.rb +5 -5
- data/test/integration/method_lookup_test.rb +5 -5
- data/test/introspection_test_helper.rb +3 -1
- data/test/minitest/stats_plugin.rb +3 -3
- metadata +6 -3
| @@ -7,8 +7,10 @@ GirFFI.setup :GIMarshallingTests | |
| 7 7 |  | 
| 8 8 | 
             
            # Tests generated methods and functions in the GIMarshallingTests namespace.
         | 
| 9 9 | 
             
            describe GIMarshallingTests do
         | 
| 10 | 
            -
              let(:derived_klass) { | 
| 11 | 
            -
             | 
| 10 | 
            +
              let(:derived_klass) {
         | 
| 11 | 
            +
                Object.const_set("DerivedClass#{Sequence.next}",
         | 
| 12 | 
            +
                                                     Class.new(GIMarshallingTests::Object))
         | 
| 13 | 
            +
              }
         | 
| 12 14 |  | 
| 13 15 | 
             
              def make_derived_instance
         | 
| 14 16 | 
             
                GirFFI.define_type derived_klass do |info|
         | 
| @@ -17,40 +19,40 @@ describe GIMarshallingTests do | |
| 17 19 | 
             
                derived_klass.new
         | 
| 18 20 | 
             
              end
         | 
| 19 21 |  | 
| 20 | 
            -
              describe  | 
| 22 | 
            +
              describe 'GIMarshallingTests::BoxedStruct' do
         | 
| 21 23 | 
             
                let(:instance) { GIMarshallingTests::BoxedStruct.new }
         | 
| 22 24 |  | 
| 23 | 
            -
                it  | 
| 25 | 
            +
                it 'has a writable field long_' do
         | 
| 24 26 | 
             
                  instance.long_ = 42
         | 
| 25 27 | 
             
                  assert_equal 42, instance.long_
         | 
| 26 28 | 
             
                  instance.long_ = 43
         | 
| 27 29 | 
             
                  assert_equal 43, instance.long_
         | 
| 28 30 | 
             
                end
         | 
| 29 31 |  | 
| 30 | 
            -
                it  | 
| 31 | 
            -
                  skip unless get_field_introspection_data( | 
| 32 | 
            -
                  instance.string_ =  | 
| 33 | 
            -
                  instance.string_.must_equal  | 
| 32 | 
            +
                it 'has a writable field string_' do
         | 
| 33 | 
            +
                  skip unless get_field_introspection_data('GIMarshallingTests', 'BoxedStruct', 'string_')
         | 
| 34 | 
            +
                  instance.string_ = 'foobar'
         | 
| 35 | 
            +
                  instance.string_.must_equal 'foobar'
         | 
| 34 36 | 
             
                end
         | 
| 35 37 |  | 
| 36 | 
            -
                it  | 
| 38 | 
            +
                it 'has a writable field g_strv' do
         | 
| 37 39 | 
             
                  instance.g_strv.must_be :==, []
         | 
| 38 | 
            -
                  instance.g_strv =  | 
| 39 | 
            -
                  instance.g_strv.must_be :==,  | 
| 40 | 
            +
                  instance.g_strv = %w(foo bar)
         | 
| 41 | 
            +
                  instance.g_strv.must_be :==, %w(foo bar)
         | 
| 40 42 | 
             
                end
         | 
| 41 43 |  | 
| 42 | 
            -
                it  | 
| 44 | 
            +
                it 'creates an instance using #new' do
         | 
| 43 45 | 
             
                  bx = GIMarshallingTests::BoxedStruct.new
         | 
| 44 46 | 
             
                  assert_instance_of GIMarshallingTests::BoxedStruct, bx
         | 
| 45 47 | 
             
                end
         | 
| 46 48 |  | 
| 47 | 
            -
                it  | 
| 49 | 
            +
                it 'has a working method #inv' do
         | 
| 48 50 | 
             
                  instance.long_ = 42
         | 
| 49 51 | 
             
                  instance.inv
         | 
| 50 52 | 
             
                  pass
         | 
| 51 53 | 
             
                end
         | 
| 52 54 |  | 
| 53 | 
            -
                it  | 
| 55 | 
            +
                it 'has a working function #inout' do
         | 
| 54 56 | 
             
                  bx = GIMarshallingTests::BoxedStruct.new
         | 
| 55 57 | 
             
                  bx.long_ = 42
         | 
| 56 58 |  | 
| @@ -62,170 +64,171 @@ describe GIMarshallingTests do | |
| 62 64 | 
             
                  assert_equal 0, res.long_
         | 
| 63 65 | 
             
                end
         | 
| 64 66 |  | 
| 65 | 
            -
                it  | 
| 67 | 
            +
                it 'has a working function #out' do
         | 
| 66 68 | 
             
                  res = GIMarshallingTests::BoxedStruct.out
         | 
| 67 69 | 
             
                  assert_equal 42, res.long_
         | 
| 68 70 | 
             
                end
         | 
| 69 71 |  | 
| 70 | 
            -
                it  | 
| 72 | 
            +
                it 'has a working function #returnv' do
         | 
| 71 73 | 
             
                  res = GIMarshallingTests::BoxedStruct.returnv
         | 
| 72 74 | 
             
                  assert_equal 42, res.long_
         | 
| 73 | 
            -
                  res.g_strv.must_be :==,  | 
| 75 | 
            +
                  res.g_strv.must_be :==, %w(0 1 2)
         | 
| 74 76 | 
             
                end
         | 
| 75 77 | 
             
              end
         | 
| 76 78 |  | 
| 77 | 
            -
              it  | 
| 79 | 
            +
              it 'has the constant CONSTANT_GERROR_CODE' do
         | 
| 78 80 | 
             
                assert_equal 5, GIMarshallingTests::CONSTANT_GERROR_CODE
         | 
| 79 81 | 
             
              end
         | 
| 80 82 |  | 
| 81 | 
            -
              it  | 
| 83 | 
            +
              it 'has the constant CONSTANT_GERROR_DEBUG_MESSAGE' do
         | 
| 82 84 | 
             
                GIMarshallingTests::CONSTANT_GERROR_DEBUG_MESSAGE.must_equal(
         | 
| 83 | 
            -
                   | 
| 85 | 
            +
                  'we got an error, life is shit')
         | 
| 84 86 | 
             
              end
         | 
| 85 87 |  | 
| 86 | 
            -
              it  | 
| 87 | 
            -
                assert_equal  | 
| 88 | 
            +
              it 'has the constant CONSTANT_GERROR_DOMAIN' do
         | 
| 89 | 
            +
                assert_equal 'gi-marshalling-tests-gerror-domain',
         | 
| 88 90 | 
             
                  GIMarshallingTests::CONSTANT_GERROR_DOMAIN
         | 
| 89 91 | 
             
              end
         | 
| 90 92 |  | 
| 91 | 
            -
              it  | 
| 92 | 
            -
                assert_equal  | 
| 93 | 
            +
              it 'has the constant CONSTANT_GERROR_MESSAGE' do
         | 
| 94 | 
            +
                assert_equal 'gi-marshalling-tests-gerror-message',
         | 
| 93 95 | 
             
                  GIMarshallingTests::CONSTANT_GERROR_MESSAGE
         | 
| 94 96 | 
             
              end
         | 
| 95 97 |  | 
| 96 | 
            -
              it  | 
| 98 | 
            +
              it 'has the constant CONSTANT_NUMBER' do
         | 
| 97 99 | 
             
                assert_equal 42, GIMarshallingTests::CONSTANT_NUMBER
         | 
| 98 100 | 
             
              end
         | 
| 99 101 |  | 
| 100 | 
            -
              it  | 
| 101 | 
            -
                assert_equal  | 
| 102 | 
            +
              it 'has the constant CONSTANT_UTF8' do
         | 
| 103 | 
            +
                assert_equal 'const ♥ utf8', GIMarshallingTests::CONSTANT_UTF8
         | 
| 102 104 | 
             
              end
         | 
| 103 105 |  | 
| 104 | 
            -
              describe  | 
| 105 | 
            -
                it  | 
| 106 | 
            +
              describe 'GIMarshallingTests::Enum' do
         | 
| 107 | 
            +
                it 'has the member :value1' do
         | 
| 106 108 | 
             
                  assert_equal 0, GIMarshallingTests::Enum[:value1]
         | 
| 107 109 | 
             
                end
         | 
| 108 110 |  | 
| 109 | 
            -
                it  | 
| 111 | 
            +
                it 'has the member :value2' do
         | 
| 110 112 | 
             
                  assert_equal 1, GIMarshallingTests::Enum[:value2]
         | 
| 111 113 | 
             
                end
         | 
| 112 114 |  | 
| 113 | 
            -
                it  | 
| 115 | 
            +
                it 'has the member :value3' do
         | 
| 114 116 | 
             
                  assert_equal 42, GIMarshallingTests::Enum[:value3]
         | 
| 115 117 | 
             
                end
         | 
| 116 118 | 
             
              end
         | 
| 117 119 |  | 
| 118 | 
            -
              describe  | 
| 119 | 
            -
                it  | 
| 120 | 
            +
              describe 'GIMarshallingTests::Flags' do
         | 
| 121 | 
            +
                it 'has the member :value1' do
         | 
| 120 122 | 
             
                  assert_equal 1, GIMarshallingTests::Flags[:value1]
         | 
| 121 123 | 
             
                end
         | 
| 122 124 |  | 
| 123 | 
            -
                it  | 
| 125 | 
            +
                it 'has the member :value2' do
         | 
| 124 126 | 
             
                  assert_equal 2, GIMarshallingTests::Flags[:value2]
         | 
| 125 127 | 
             
                end
         | 
| 126 128 |  | 
| 127 | 
            -
                it  | 
| 129 | 
            +
                it 'has the member :value3' do
         | 
| 128 130 | 
             
                  assert_equal 4, GIMarshallingTests::Flags[:value3]
         | 
| 129 131 | 
             
                end
         | 
| 130 132 |  | 
| 131 | 
            -
                it  | 
| 133 | 
            +
                it 'has the member :mask' do
         | 
| 132 134 | 
             
                  assert_equal 3, GIMarshallingTests::Flags[:mask]
         | 
| 133 135 | 
             
                end
         | 
| 134 136 |  | 
| 135 | 
            -
                it  | 
| 137 | 
            +
                it 'has the member :mask2' do
         | 
| 136 138 | 
             
                  assert_equal 3, GIMarshallingTests::Flags[:mask2]
         | 
| 137 139 | 
             
                end
         | 
| 138 140 |  | 
| 139 | 
            -
                it  | 
| 141 | 
            +
                it 'has a working function #in' do
         | 
| 140 142 | 
             
                  GIMarshallingTests::Flags.in :value2
         | 
| 141 143 | 
             
                end
         | 
| 142 144 |  | 
| 143 | 
            -
                it  | 
| 145 | 
            +
                it 'has a working function #in_zero' do
         | 
| 144 146 | 
             
                  GIMarshallingTests::Flags.in_zero 0
         | 
| 145 147 | 
             
                end
         | 
| 146 148 |  | 
| 147 | 
            -
                it  | 
| 149 | 
            +
                it 'has a working function #inout' do
         | 
| 148 150 | 
             
                  result = GIMarshallingTests::Flags.inout :value2
         | 
| 149 151 | 
             
                  result.must_equal :value1
         | 
| 150 152 | 
             
                end
         | 
| 151 153 |  | 
| 152 | 
            -
                it  | 
| 154 | 
            +
                it 'has a working function #out' do
         | 
| 153 155 | 
             
                  result = GIMarshallingTests::Flags.out
         | 
| 154 156 | 
             
                  result.must_equal :value2
         | 
| 155 157 | 
             
                end
         | 
| 156 158 |  | 
| 157 | 
            -
                it  | 
| 159 | 
            +
                it 'has a working function #returnv' do
         | 
| 158 160 | 
             
                  result = GIMarshallingTests::Flags.returnv
         | 
| 159 161 | 
             
                  result.must_equal :value2
         | 
| 160 162 | 
             
                end
         | 
| 161 163 | 
             
              end
         | 
| 162 164 |  | 
| 163 | 
            -
              describe  | 
| 164 | 
            -
                it  | 
| 165 | 
            +
              describe 'GIMarshallingTests::GEnum' do
         | 
| 166 | 
            +
                it 'has the member :value1' do
         | 
| 165 167 | 
             
                  assert_equal 0, GIMarshallingTests::GEnum[:value1]
         | 
| 166 168 | 
             
                end
         | 
| 167 169 |  | 
| 168 | 
            -
                it  | 
| 170 | 
            +
                it 'has the member :value2' do
         | 
| 169 171 | 
             
                  assert_equal 1, GIMarshallingTests::GEnum[:value2]
         | 
| 170 172 | 
             
                end
         | 
| 171 173 |  | 
| 172 | 
            -
                it  | 
| 174 | 
            +
                it 'has the member :value3' do
         | 
| 173 175 | 
             
                  assert_equal 42, GIMarshallingTests::GEnum[:value3]
         | 
| 174 176 | 
             
                end
         | 
| 175 177 |  | 
| 176 | 
            -
                it  | 
| 178 | 
            +
                it 'has a working function #in' do
         | 
| 177 179 | 
             
                  GIMarshallingTests::GEnum.in :value3
         | 
| 178 180 | 
             
                end
         | 
| 179 181 |  | 
| 180 | 
            -
                it  | 
| 182 | 
            +
                it 'has a working function #inout' do
         | 
| 181 183 | 
             
                  result = GIMarshallingTests::GEnum.inout :value3
         | 
| 182 184 | 
             
                  result.must_equal :value1
         | 
| 183 185 | 
             
                end
         | 
| 184 186 |  | 
| 185 | 
            -
                it  | 
| 187 | 
            +
                it 'has a working function #out' do
         | 
| 186 188 | 
             
                  result = GIMarshallingTests::GEnum.out
         | 
| 187 189 | 
             
                  result.must_equal :value3
         | 
| 188 190 | 
             
                end
         | 
| 189 191 |  | 
| 190 | 
            -
                it  | 
| 192 | 
            +
                it 'has a working function #returnv' do
         | 
| 191 193 | 
             
                  result = GIMarshallingTests::GEnum.returnv
         | 
| 192 194 | 
             
                  result.must_equal :value3
         | 
| 193 195 | 
             
                end
         | 
| 194 196 | 
             
              end
         | 
| 195 197 |  | 
| 196 | 
            -
              describe  | 
| 197 | 
            -
                it  | 
| 198 | 
            +
              describe 'GIMarshallingTests::Interface' do
         | 
| 199 | 
            +
                it 'has a working method #test_int8_in' do
         | 
| 198 200 | 
             
                  derived_klass.class_eval { include GIMarshallingTests::Interface }
         | 
| 199 201 | 
             
                  instance = make_derived_instance do |info|
         | 
| 200 | 
            -
                    info.install_vfunc_implementation :test_int8_in, proc {|obj, in_| obj.int = in_ }
         | 
| 202 | 
            +
                    info.install_vfunc_implementation :test_int8_in, proc { |obj, in_| obj.int = in_ }
         | 
| 201 203 | 
             
                  end
         | 
| 202 204 | 
             
                  instance.test_int8_in 8
         | 
| 203 205 | 
             
                  instance.int.must_equal 8
         | 
| 204 206 | 
             
                end
         | 
| 205 207 | 
             
              end
         | 
| 206 208 |  | 
| 207 | 
            -
              describe  | 
| 208 | 
            -
                it  | 
| 209 | 
            -
                  skip  | 
| 209 | 
            +
              describe 'GIMarshallingTests::Interface2' do
         | 
| 210 | 
            +
                it 'must be tested for clashes with Interface' do
         | 
| 211 | 
            +
                  skip 'Needs more work to determine desired behavior'
         | 
| 210 212 | 
             
                end
         | 
| 211 213 | 
             
              end
         | 
| 212 214 |  | 
| 213 | 
            -
              describe  | 
| 214 | 
            -
                it  | 
| 215 | 
            +
              describe 'GIMarshallingTests::Interface3' do
         | 
| 216 | 
            +
                it 'has a working method #test_variant_array_in' do
         | 
| 215 217 | 
             
                  skip unless get_introspection_data 'GIMarshallingTests', 'Interface3'
         | 
| 216 218 | 
             
                  derived_klass.class_eval { include GIMarshallingTests::Interface3 }
         | 
| 217 219 | 
             
                  instance = make_derived_instance do |info|
         | 
| 218 220 | 
             
                    info.install_vfunc_implementation :test_variant_array_in, proc {|obj, in_|
         | 
| 219 | 
            -
                      obj.int = in_.to_a.first.get_byte | 
| 221 | 
            +
                      obj.int = in_.to_a.first.get_byte
         | 
| 222 | 
            +
                    }
         | 
| 220 223 | 
             
                  end
         | 
| 221 224 | 
             
                  instance.test_variant_array_in [GLib::Variant.new_byte(42)]
         | 
| 222 225 | 
             
                  instance.int.must_equal 42
         | 
| 223 226 | 
             
                end
         | 
| 224 227 | 
             
              end
         | 
| 225 228 |  | 
| 226 | 
            -
              describe  | 
| 229 | 
            +
              describe 'GIMarshallingTests::NestedStruct' do
         | 
| 227 230 | 
             
                let(:instance) { GIMarshallingTests::NestedStruct.new }
         | 
| 228 | 
            -
                it  | 
| 231 | 
            +
                it 'has a writable field simple_struct' do
         | 
| 229 232 | 
             
                  assert_instance_of GIMarshallingTests::SimpleStruct,
         | 
| 230 233 | 
             
                    instance.simple_struct
         | 
| 231 234 | 
             
                  new_struct = GIMarshallingTests::SimpleStruct.new
         | 
| @@ -235,28 +238,28 @@ describe GIMarshallingTests do | |
| 235 238 | 
             
                end
         | 
| 236 239 | 
             
              end
         | 
| 237 240 |  | 
| 238 | 
            -
              describe  | 
| 239 | 
            -
                it  | 
| 241 | 
            +
              describe 'GIMarshallingTests::NoTypeFlags' do
         | 
| 242 | 
            +
                it 'has the member :value1' do
         | 
| 240 243 | 
             
                  assert_equal 1, GIMarshallingTests::NoTypeFlags[:value1]
         | 
| 241 244 | 
             
                end
         | 
| 242 | 
            -
                it  | 
| 245 | 
            +
                it 'has the member :value2' do
         | 
| 243 246 | 
             
                  assert_equal 2, GIMarshallingTests::NoTypeFlags[:value2]
         | 
| 244 247 | 
             
                end
         | 
| 245 | 
            -
                it  | 
| 248 | 
            +
                it 'has the member :value3' do
         | 
| 246 249 | 
             
                  assert_equal 4, GIMarshallingTests::NoTypeFlags[:value3]
         | 
| 247 250 | 
             
                end
         | 
| 248 | 
            -
                it  | 
| 251 | 
            +
                it 'has the member :mask' do
         | 
| 249 252 | 
             
                  assert_equal 3, GIMarshallingTests::NoTypeFlags[:mask]
         | 
| 250 253 | 
             
                end
         | 
| 251 | 
            -
                it  | 
| 254 | 
            +
                it 'has the member :mask2' do
         | 
| 252 255 | 
             
                  assert_equal 3, GIMarshallingTests::NoTypeFlags[:mask2]
         | 
| 253 256 | 
             
                end
         | 
| 254 257 | 
             
              end
         | 
| 255 258 |  | 
| 256 | 
            -
              describe  | 
| 259 | 
            +
              describe 'GIMarshallingTests::NotSimpleStruct' do
         | 
| 257 260 | 
             
                let(:instance) { GIMarshallingTests::NotSimpleStruct.new }
         | 
| 258 261 |  | 
| 259 | 
            -
                it  | 
| 262 | 
            +
                it 'has a writable field pointer' do
         | 
| 260 263 | 
             
                  instance.pointer.must_be_nil
         | 
| 261 264 | 
             
                  nested = GIMarshallingTests::NestedStruct.new
         | 
| 262 265 | 
             
                  instance.pointer = nested
         | 
| @@ -264,18 +267,18 @@ describe GIMarshallingTests do | |
| 264 267 | 
             
                end
         | 
| 265 268 | 
             
              end
         | 
| 266 269 |  | 
| 267 | 
            -
              it  | 
| 270 | 
            +
              it 'has the constant OVERRIDES_CONSTANT' do
         | 
| 268 271 | 
             
                assert_equal 42, GIMarshallingTests::OVERRIDES_CONSTANT
         | 
| 269 272 | 
             
              end
         | 
| 270 273 |  | 
| 271 | 
            -
              describe  | 
| 272 | 
            -
                it  | 
| 274 | 
            +
              describe 'GIMarshallingTests::Object' do
         | 
| 275 | 
            +
                it 'creates an instance using #new' do
         | 
| 273 276 | 
             
                  ob = GIMarshallingTests::Object.new 42
         | 
| 274 277 | 
             
                  assert_instance_of GIMarshallingTests::Object, ob
         | 
| 275 278 | 
             
                  assert_equal 42, ob.int
         | 
| 276 279 | 
             
                end
         | 
| 277 280 |  | 
| 278 | 
            -
                it  | 
| 281 | 
            +
                it 'has a working function #full_inout' do
         | 
| 279 282 | 
             
                  ob = GIMarshallingTests::Object.new 42
         | 
| 280 283 |  | 
| 281 284 | 
             
                  res = GIMarshallingTests::Object.full_inout ob
         | 
| @@ -286,53 +289,53 @@ describe GIMarshallingTests do | |
| 286 289 | 
             
                  res.int.must_equal 0
         | 
| 287 290 | 
             
                end
         | 
| 288 291 |  | 
| 289 | 
            -
                it  | 
| 292 | 
            +
                it 'has a working function #full_out' do
         | 
| 290 293 | 
             
                  res = GIMarshallingTests::Object.full_out
         | 
| 291 294 | 
             
                  assert_instance_of GIMarshallingTests::Object, res
         | 
| 292 295 | 
             
                end
         | 
| 293 296 |  | 
| 294 | 
            -
                it  | 
| 297 | 
            +
                it 'has a working function #full_return' do
         | 
| 295 298 | 
             
                  res = GIMarshallingTests::Object.full_return
         | 
| 296 299 | 
             
                  assert_instance_of GIMarshallingTests::Object, res
         | 
| 297 300 | 
             
                end
         | 
| 298 301 |  | 
| 299 | 
            -
                it  | 
| 300 | 
            -
                  skip  | 
| 302 | 
            +
                it 'has a working function #inout_same' do
         | 
| 303 | 
            +
                  skip 'This function is defined in the header but not implemented'
         | 
| 301 304 | 
             
                end
         | 
| 302 305 |  | 
| 303 | 
            -
                it  | 
| 306 | 
            +
                it 'has a working function #none_inout' do
         | 
| 304 307 | 
             
                  ob = GIMarshallingTests::Object.new 42
         | 
| 305 308 | 
             
                  res = GIMarshallingTests::Object.none_inout ob
         | 
| 306 309 | 
             
                  assert_instance_of GIMarshallingTests::Object, res
         | 
| 307 310 | 
             
                  ob.wont_equal res
         | 
| 308 311 | 
             
                end
         | 
| 309 312 |  | 
| 310 | 
            -
                it  | 
| 313 | 
            +
                it 'has a working function #none_out' do
         | 
| 311 314 | 
             
                  res = GIMarshallingTests::Object.none_out
         | 
| 312 315 | 
             
                  assert_instance_of GIMarshallingTests::Object, res
         | 
| 313 316 | 
             
                end
         | 
| 314 317 |  | 
| 315 | 
            -
                it  | 
| 318 | 
            +
                it 'has a working function #none_return' do
         | 
| 316 319 | 
             
                  res = GIMarshallingTests::Object.none_return
         | 
| 317 320 | 
             
                  assert_instance_of GIMarshallingTests::Object, res
         | 
| 318 321 | 
             
                end
         | 
| 319 322 |  | 
| 320 | 
            -
                it  | 
| 323 | 
            +
                it 'has a working function #static_method' do
         | 
| 321 324 | 
             
                  GIMarshallingTests::Object.static_method
         | 
| 322 325 | 
             
                  pass
         | 
| 323 326 | 
             
                end
         | 
| 324 327 |  | 
| 325 328 | 
             
                let(:instance) { GIMarshallingTests::Object.new 42 }
         | 
| 326 329 |  | 
| 327 | 
            -
                it  | 
| 328 | 
            -
                  skip unless get_method_introspection_data( | 
| 329 | 
            -
                                                             | 
| 330 | 
            +
                it 'has a working method #call_vfunc_with_callback' do
         | 
| 331 | 
            +
                  skip unless get_method_introspection_data('GIMarshallingTests', 'Object',
         | 
| 332 | 
            +
                                                            'call_vfunc_with_callback')
         | 
| 330 333 | 
             
                  cb = nil
         | 
| 331 334 | 
             
                  user_data = nil
         | 
| 332 335 | 
             
                  result = nil
         | 
| 333 336 |  | 
| 334 337 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 335 | 
            -
                    info.install_vfunc_implementation :vfunc_with_callback, proc { | | 
| 338 | 
            +
                    info.install_vfunc_implementation :vfunc_with_callback, proc { |_obj, callback, callback_data|
         | 
| 336 339 | 
             
                      cb = callback
         | 
| 337 340 | 
             
                      user_data = callback_data.address
         | 
| 338 341 | 
             
                      result = callback.call(42, callback_data)
         | 
| @@ -347,16 +350,16 @@ describe GIMarshallingTests do | |
| 347 350 | 
             
                  result.must_equal 42
         | 
| 348 351 | 
             
                end
         | 
| 349 352 |  | 
| 350 | 
            -
                it  | 
| 351 | 
            -
                  skip  | 
| 353 | 
            +
                it 'has a working method #full_in' do
         | 
| 354 | 
            +
                  skip 'This function is defined in the header but not implemented'
         | 
| 352 355 | 
             
                end
         | 
| 353 356 |  | 
| 354 | 
            -
                it  | 
| 355 | 
            -
                  skip unless get_vfunc_introspection_data( | 
| 356 | 
            -
                                                            | 
| 357 | 
            +
                it 'has a working method #get_ref_info_for_vfunc_in_object_transfer_full' do
         | 
| 358 | 
            +
                  skip unless get_vfunc_introspection_data('GIMarshallingTests', 'Object',
         | 
| 359 | 
            +
                                                           'vfunc_in_object_transfer_full')
         | 
| 357 360 | 
             
                  obj = nil
         | 
| 358 361 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 359 | 
            -
                    info.install_vfunc_implementation :vfunc_in_object_transfer_full, proc {| | 
| 362 | 
            +
                    info.install_vfunc_implementation :vfunc_in_object_transfer_full, proc {|_this, object|
         | 
| 360 363 | 
             
                      obj = object
         | 
| 361 364 | 
             
                    }
         | 
| 362 365 | 
             
                  end
         | 
| @@ -366,12 +369,12 @@ describe GIMarshallingTests do | |
| 366 369 | 
             
                  obj.must_be_instance_of GIMarshallingTests::Object
         | 
| 367 370 | 
             
                end
         | 
| 368 371 |  | 
| 369 | 
            -
                it  | 
| 370 | 
            -
                  skip unless get_vfunc_introspection_data( | 
| 371 | 
            -
                                                            | 
| 372 | 
            +
                it 'has a working method #get_ref_info_for_vfunc_in_object_transfer_none' do
         | 
| 373 | 
            +
                  skip unless get_vfunc_introspection_data('GIMarshallingTests', 'Object',
         | 
| 374 | 
            +
                                                           'vfunc_in_object_transfer_none')
         | 
| 372 375 | 
             
                  klass = nil
         | 
| 373 376 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 374 | 
            -
                    info.install_vfunc_implementation :vfunc_in_object_transfer_none, proc {| | 
| 377 | 
            +
                    info.install_vfunc_implementation :vfunc_in_object_transfer_none, proc {|_this, object|
         | 
| 375 378 | 
             
                      klass = object.class
         | 
| 376 379 | 
             
                    }
         | 
| 377 380 | 
             
                  end
         | 
| @@ -381,11 +384,11 @@ describe GIMarshallingTests do | |
| 381 384 | 
             
                  klass.must_equal GIMarshallingTests::Object
         | 
| 382 385 | 
             
                end
         | 
| 383 386 |  | 
| 384 | 
            -
                it  | 
| 385 | 
            -
                  skip unless get_vfunc_introspection_data( | 
| 386 | 
            -
                                                            | 
| 387 | 
            +
                it 'has a working method #get_ref_info_for_vfunc_out_object_transfer_full' do
         | 
| 388 | 
            +
                  skip unless get_vfunc_introspection_data('GIMarshallingTests', 'Object',
         | 
| 389 | 
            +
                                                           'vfunc_out_object_transfer_full')
         | 
| 387 390 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 388 | 
            -
                    info.install_vfunc_implementation :vfunc_out_object_transfer_full, proc {| | 
| 391 | 
            +
                    info.install_vfunc_implementation :vfunc_out_object_transfer_full, proc {|_obj|
         | 
| 389 392 | 
             
                      GIMarshallingTests::Object.new 42
         | 
| 390 393 | 
             
                    }
         | 
| 391 394 | 
             
                  end
         | 
| @@ -393,11 +396,11 @@ describe GIMarshallingTests do | |
| 393 396 | 
             
                  result.must_equal [1, false]
         | 
| 394 397 | 
             
                end
         | 
| 395 398 |  | 
| 396 | 
            -
                it  | 
| 397 | 
            -
                  skip unless get_vfunc_introspection_data( | 
| 398 | 
            -
                                                            | 
| 399 | 
            +
                it 'has a working method #get_ref_info_for_vfunc_out_object_transfer_none' do
         | 
| 400 | 
            +
                  skip unless get_vfunc_introspection_data('GIMarshallingTests', 'Object',
         | 
| 401 | 
            +
                                                           'vfunc_out_object_transfer_none')
         | 
| 399 402 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 400 | 
            -
                    info.install_vfunc_implementation :vfunc_out_object_transfer_none, proc {| | 
| 403 | 
            +
                    info.install_vfunc_implementation :vfunc_out_object_transfer_none, proc {|_obj|
         | 
| 401 404 | 
             
                      GIMarshallingTests::Object.new 42
         | 
| 402 405 | 
             
                    }
         | 
| 403 406 | 
             
                  end
         | 
| @@ -405,11 +408,11 @@ describe GIMarshallingTests do | |
| 405 408 | 
             
                  result.must_equal [1, false]
         | 
| 406 409 | 
             
                end
         | 
| 407 410 |  | 
| 408 | 
            -
                it  | 
| 409 | 
            -
                  skip unless get_vfunc_introspection_data( | 
| 410 | 
            -
                                                            | 
| 411 | 
            +
                it 'has a working method #get_ref_info_for_vfunc_return_object_transfer_full' do
         | 
| 412 | 
            +
                  skip unless get_vfunc_introspection_data('GIMarshallingTests', 'Object',
         | 
| 413 | 
            +
                                                           'vfunc_return_object_transfer_full')
         | 
| 411 414 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 412 | 
            -
                    info.install_vfunc_implementation :vfunc_return_object_transfer_full, proc {| | 
| 415 | 
            +
                    info.install_vfunc_implementation :vfunc_return_object_transfer_full, proc {|_obj|
         | 
| 413 416 | 
             
                      GIMarshallingTests::Object.new 42
         | 
| 414 417 | 
             
                    }
         | 
| 415 418 | 
             
                  end
         | 
| @@ -417,11 +420,11 @@ describe GIMarshallingTests do | |
| 417 420 | 
             
                  result.must_equal [1, false]
         | 
| 418 421 | 
             
                end
         | 
| 419 422 |  | 
| 420 | 
            -
                it  | 
| 421 | 
            -
                  skip unless get_vfunc_introspection_data( | 
| 422 | 
            -
                                                            | 
| 423 | 
            +
                it 'has a working method #get_ref_info_for_vfunc_return_object_transfer_none' do
         | 
| 424 | 
            +
                  skip unless get_vfunc_introspection_data('GIMarshallingTests', 'Object',
         | 
| 425 | 
            +
                                                           'vfunc_return_object_transfer_none')
         | 
| 423 426 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 424 | 
            -
                    info.install_vfunc_implementation :vfunc_return_object_transfer_none, proc {| | 
| 427 | 
            +
                    info.install_vfunc_implementation :vfunc_return_object_transfer_none, proc {|_obj|
         | 
| 425 428 | 
             
                      GIMarshallingTests::Object.new 42
         | 
| 426 429 | 
             
                    }
         | 
| 427 430 | 
             
                  end
         | 
| @@ -429,9 +432,9 @@ describe GIMarshallingTests do | |
| 429 432 | 
             
                  result.must_equal [1, false]
         | 
| 430 433 | 
             
                end
         | 
| 431 434 |  | 
| 432 | 
            -
                it  | 
| 435 | 
            +
                it 'has a working method #int8_in' do
         | 
| 433 436 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 434 | 
            -
                    info.install_vfunc_implementation :method_int8_in, proc {|obj, in_| obj.int = in_ }
         | 
| 437 | 
            +
                    info.install_vfunc_implementation :method_int8_in, proc { |obj, in_| obj.int = in_ }
         | 
| 435 438 | 
             
                  end
         | 
| 436 439 | 
             
                  derived_instance.int8_in 23
         | 
| 437 440 | 
             
                  derived_instance.int.must_equal 23
         | 
| @@ -439,40 +442,40 @@ describe GIMarshallingTests do | |
| 439 442 |  | 
| 440 443 | 
             
                # TODO: Check if this is fixed
         | 
| 441 444 | 
             
                # See https://bugzilla.gnome.org/show_bug.cgi?id=727665
         | 
| 442 | 
            -
                it  | 
| 443 | 
            -
                  skip  | 
| 445 | 
            +
                it 'has a working method #int8_out' do
         | 
| 446 | 
            +
                  skip 'Introspection data is not generated correctly'
         | 
| 444 447 | 
             
                end
         | 
| 445 448 |  | 
| 446 | 
            -
                it  | 
| 449 | 
            +
                it 'has a working method #method' do
         | 
| 447 450 | 
             
                  instance.method
         | 
| 448 451 | 
             
                  pass
         | 
| 449 452 | 
             
                end
         | 
| 450 453 |  | 
| 451 | 
            -
                it  | 
| 454 | 
            +
                it 'has a working method #method_array_in' do
         | 
| 452 455 | 
             
                  instance.method_array_in [-1, 0, 1, 2]
         | 
| 453 456 | 
             
                  pass
         | 
| 454 457 | 
             
                end
         | 
| 455 458 |  | 
| 456 | 
            -
                it  | 
| 459 | 
            +
                it 'has a working method #method_array_inout' do
         | 
| 457 460 | 
             
                  res = instance.method_array_inout [-1, 0, 1, 2]
         | 
| 458 461 | 
             
                  res.must_be :==, [-2, -1, 0, 1, 2]
         | 
| 459 462 | 
             
                end
         | 
| 460 463 |  | 
| 461 | 
            -
                it  | 
| 464 | 
            +
                it 'has a working method #method_array_out' do
         | 
| 462 465 | 
             
                  res = instance.method_array_out
         | 
| 463 466 | 
             
                  res.must_be :==, [-1, 0, 1, 2]
         | 
| 464 467 | 
             
                end
         | 
| 465 468 |  | 
| 466 | 
            -
                it  | 
| 469 | 
            +
                it 'has a working method #method_array_return' do
         | 
| 467 470 | 
             
                  res = instance.method_array_return
         | 
| 468 471 | 
             
                  res.must_be :==, [-1, 0, 1, 2]
         | 
| 469 472 | 
             
                end
         | 
| 470 473 |  | 
| 471 | 
            -
                it  | 
| 472 | 
            -
                  skip unless get_method_introspection_data( | 
| 473 | 
            -
                                                             | 
| 474 | 
            +
                it 'has a working method #method_int8_arg_and_out_callee' do
         | 
| 475 | 
            +
                  skip unless get_method_introspection_data('GIMarshallingTests', 'Object',
         | 
| 476 | 
            +
                                                            'method_int8_arg_and_out_callee')
         | 
| 474 477 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 475 | 
            -
                    info.install_vfunc_implementation :method_int8_arg_and_out_callee, proc { | | 
| 478 | 
            +
                    info.install_vfunc_implementation :method_int8_arg_and_out_callee, proc { |_obj, arg|
         | 
| 476 479 | 
             
                      2 * arg
         | 
| 477 480 | 
             
                    }
         | 
| 478 481 | 
             
                  end
         | 
| @@ -480,11 +483,11 @@ describe GIMarshallingTests do | |
| 480 483 | 
             
                  result.must_equal 64
         | 
| 481 484 | 
             
                end
         | 
| 482 485 |  | 
| 483 | 
            -
                it  | 
| 484 | 
            -
                  skip unless get_method_introspection_data( | 
| 485 | 
            -
                                                             | 
| 486 | 
            +
                it 'has a working method #method_int8_arg_and_out_caller' do
         | 
| 487 | 
            +
                  skip unless get_method_introspection_data('GIMarshallingTests', 'Object',
         | 
| 488 | 
            +
                                                            'method_int8_arg_and_out_caller')
         | 
| 486 489 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 487 | 
            -
                    info.install_vfunc_implementation :method_int8_arg_and_out_caller, proc { | | 
| 490 | 
            +
                    info.install_vfunc_implementation :method_int8_arg_and_out_caller, proc { |_obj, arg|
         | 
| 488 491 | 
             
                      2 * arg
         | 
| 489 492 | 
             
                    }
         | 
| 490 493 | 
             
                  end
         | 
| @@ -492,55 +495,55 @@ describe GIMarshallingTests do | |
| 492 495 | 
             
                  result.must_equal 64
         | 
| 493 496 | 
             
                end
         | 
| 494 497 |  | 
| 495 | 
            -
                it  | 
| 498 | 
            +
                it 'has a working method #method_int8_in' do
         | 
| 496 499 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 497 | 
            -
                    info.install_vfunc_implementation :method_int8_in, proc {|obj, in_| obj.int = in_ }
         | 
| 500 | 
            +
                    info.install_vfunc_implementation :method_int8_in, proc { |obj, in_| obj.int = in_ }
         | 
| 498 501 | 
             
                  end
         | 
| 499 502 | 
             
                  derived_instance.method_int8_in 108
         | 
| 500 503 | 
             
                  derived_instance.int.must_equal 108
         | 
| 501 504 | 
             
                end
         | 
| 502 505 |  | 
| 503 | 
            -
                it  | 
| 506 | 
            +
                it 'has a working method #method_int8_out' do
         | 
| 504 507 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 505 | 
            -
                    info.install_vfunc_implementation :method_int8_out, proc {| | 
| 508 | 
            +
                    info.install_vfunc_implementation :method_int8_out, proc { |_obj| 42 }
         | 
| 506 509 | 
             
                  end
         | 
| 507 510 | 
             
                  derived_instance.method_int8_out.must_equal 42
         | 
| 508 511 | 
             
                end
         | 
| 509 512 |  | 
| 510 | 
            -
                it  | 
| 511 | 
            -
                  skip unless get_vfunc_introspection_data( | 
| 512 | 
            -
                                                            | 
| 513 | 
            +
                it 'has a working method #method_str_arg_out_ret' do
         | 
| 514 | 
            +
                  skip unless get_vfunc_introspection_data('GIMarshallingTests', 'Object',
         | 
| 515 | 
            +
                                                           'method_str_arg_out_ret')
         | 
| 513 516 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 514 | 
            -
                    info.install_vfunc_implementation :method_str_arg_out_ret, proc {| | 
| 517 | 
            +
                    info.install_vfunc_implementation :method_str_arg_out_ret, proc { |_obj, arg| [arg, 42] }
         | 
| 515 518 | 
             
                  end
         | 
| 516 | 
            -
                  derived_instance.method_str_arg_out_ret( | 
| 519 | 
            +
                  derived_instance.method_str_arg_out_ret('foo').must_equal ['foo', 42]
         | 
| 517 520 | 
             
                end
         | 
| 518 521 |  | 
| 519 | 
            -
                it  | 
| 520 | 
            -
                  skip  | 
| 522 | 
            +
                it 'has a working method #method_variant_array_in' do
         | 
| 523 | 
            +
                  skip 'This function is defined in the header but not implemented'
         | 
| 521 524 | 
             
                end
         | 
| 522 525 |  | 
| 523 | 
            -
                it  | 
| 526 | 
            +
                it 'has a working method #method_with_default_implementation' do
         | 
| 524 527 | 
             
                  instance.method_with_default_implementation 104
         | 
| 525 528 | 
             
                  assert_equal 104, instance.int
         | 
| 526 529 | 
             
                end
         | 
| 527 530 |  | 
| 528 | 
            -
                it  | 
| 531 | 
            +
                it 'has a working method #none_in' do
         | 
| 529 532 | 
             
                  instance.none_in
         | 
| 530 533 | 
             
                  pass
         | 
| 531 534 | 
             
                end
         | 
| 532 535 |  | 
| 533 | 
            -
                it  | 
| 534 | 
            -
                  instance.set_property( | 
| 536 | 
            +
                it 'has a working method #overridden_method' do
         | 
| 537 | 
            +
                  instance.set_property('int', 0)
         | 
| 535 538 | 
             
                  instance.overridden_method
         | 
| 536 539 | 
             
                  pass
         | 
| 537 540 | 
             
                end
         | 
| 538 541 |  | 
| 539 | 
            -
                it  | 
| 540 | 
            -
                  skip unless get_vfunc_introspection_data( | 
| 541 | 
            -
                                                            | 
| 542 | 
            +
                it 'has a working method #vfunc_array_out_parameter' do
         | 
| 543 | 
            +
                  skip unless get_vfunc_introspection_data('GIMarshallingTests', 'Object',
         | 
| 544 | 
            +
                                                           'vfunc_array_out_parameter')
         | 
| 542 545 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 543 | 
            -
                    info.install_vfunc_implementation :vfunc_array_out_parameter, proc {| | 
| 546 | 
            +
                    info.install_vfunc_implementation :vfunc_array_out_parameter, proc {|_obj|
         | 
| 544 547 | 
             
                      [1.1, 2.2, 3.3]
         | 
| 545 548 | 
             
                    }
         | 
| 546 549 | 
             
                  end
         | 
| @@ -552,22 +555,22 @@ describe GIMarshallingTests do | |
| 552 555 | 
             
                  arr[2].must_be_close_to 3.3
         | 
| 553 556 | 
             
                end
         | 
| 554 557 |  | 
| 555 | 
            -
                it  | 
| 556 | 
            -
                  skip unless get_vfunc_introspection_data( | 
| 557 | 
            -
                                                            | 
| 558 | 
            +
                it 'has a working method #vfunc_caller_allocated_out_parameter' do
         | 
| 559 | 
            +
                  skip unless get_vfunc_introspection_data('GIMarshallingTests', 'Object',
         | 
| 560 | 
            +
                                                           'vfunc_caller_allocated_out_parameter')
         | 
| 558 561 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 559 | 
            -
                    info.install_vfunc_implementation :vfunc_caller_allocated_out_parameter, proc {| | 
| 560 | 
            -
                       | 
| 562 | 
            +
                    info.install_vfunc_implementation :vfunc_caller_allocated_out_parameter, proc {|_obj|
         | 
| 563 | 
            +
                      'Hello!'
         | 
| 561 564 | 
             
                    }
         | 
| 562 565 | 
             
                  end
         | 
| 563 566 | 
             
                  result = derived_instance.vfunc_caller_allocated_out_parameter
         | 
| 564 | 
            -
                  result.get_value.must_equal  | 
| 567 | 
            +
                  result.get_value.must_equal 'Hello!'
         | 
| 565 568 | 
             
                end
         | 
| 566 569 |  | 
| 567 | 
            -
                it  | 
| 570 | 
            +
                it 'has a working method #vfunc_meth_with_error' do
         | 
| 568 571 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 569 | 
            -
                    info.install_vfunc_implementation :vfunc_meth_with_err, proc {| | 
| 570 | 
            -
                      raise  | 
| 572 | 
            +
                    info.install_vfunc_implementation :vfunc_meth_with_err, proc {|_object, x|
         | 
| 573 | 
            +
                      raise 'This is not the answer!' unless x == 42
         | 
| 571 574 | 
             
                      true
         | 
| 572 575 | 
             
                    }
         | 
| 573 576 | 
             
                  end
         | 
| @@ -576,86 +579,86 @@ describe GIMarshallingTests do | |
| 576 579 |  | 
| 577 580 | 
             
                  err = proc { derived_instance.vfunc_meth_with_error(21) }.
         | 
| 578 581 | 
             
                    must_raise GirFFI::GLibError
         | 
| 579 | 
            -
                  err.message.must_equal  | 
| 580 | 
            -
                  err.domain.must_equal  | 
| 582 | 
            +
                  err.message.must_equal 'This is not the answer!'
         | 
| 583 | 
            +
                  err.domain.must_equal 'gir_ffi'
         | 
| 581 584 | 
             
                  err.code.must_equal 0
         | 
| 582 585 | 
             
                end
         | 
| 583 586 |  | 
| 584 | 
            -
                it  | 
| 587 | 
            +
                it 'has a working method #vfunc_multiple_out_parameters' do
         | 
| 585 588 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 586 589 | 
             
                    info.install_vfunc_implementation(
         | 
| 587 590 | 
             
                      :vfunc_multiple_out_parameters,
         | 
| 588 | 
            -
                      proc {|* | 
| 591 | 
            +
                      proc { |*_args| [42.1, -142.3] })
         | 
| 589 592 | 
             
                  end
         | 
| 590 593 | 
             
                  result = derived_instance.vfunc_multiple_out_parameters
         | 
| 591 594 | 
             
                  result[0].must_be_close_to 42.1
         | 
| 592 595 | 
             
                  result[1].must_be_close_to(-142.3)
         | 
| 593 596 | 
             
                end
         | 
| 594 597 |  | 
| 595 | 
            -
                it  | 
| 598 | 
            +
                it 'has a working method #vfunc_one_out_parameter' do
         | 
| 596 599 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 597 600 | 
             
                    info.install_vfunc_implementation(
         | 
| 598 601 | 
             
                      :vfunc_one_out_parameter,
         | 
| 599 | 
            -
                      proc {|* | 
| 602 | 
            +
                      proc { |*_args| 23.4 })
         | 
| 600 603 | 
             
                  end
         | 
| 601 604 | 
             
                  derived_instance.vfunc_one_out_parameter.
         | 
| 602 605 | 
             
                    must_be_within_epsilon 23.4
         | 
| 603 606 | 
             
                end
         | 
| 604 607 |  | 
| 605 | 
            -
                it  | 
| 606 | 
            -
                  skip unless get_vfunc_introspection_data( | 
| 607 | 
            -
                                                            | 
| 608 | 
            +
                it 'has a working method #vfunc_out_enum' do
         | 
| 609 | 
            +
                  skip unless get_vfunc_introspection_data('GIMarshallingTests', 'Object',
         | 
| 610 | 
            +
                                                           'vfunc_out_enum')
         | 
| 608 611 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 609 | 
            -
                    info.install_vfunc_implementation :vfunc_out_enum, proc {| | 
| 612 | 
            +
                    info.install_vfunc_implementation :vfunc_out_enum, proc { |_obj| :value2 }
         | 
| 610 613 | 
             
                  end
         | 
| 611 614 | 
             
                  derived_instance.vfunc_out_enum.must_equal :value2
         | 
| 612 615 | 
             
                end
         | 
| 613 616 |  | 
| 614 | 
            -
                it  | 
| 615 | 
            -
                  skip unless get_vfunc_introspection_data( | 
| 616 | 
            -
                                                            | 
| 617 | 
            +
                it 'has a working method #vfunc_return_enum' do
         | 
| 618 | 
            +
                  skip unless get_vfunc_introspection_data('GIMarshallingTests', 'Object',
         | 
| 619 | 
            +
                                                           'vfunc_return_enum')
         | 
| 617 620 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 618 | 
            -
                    info.install_vfunc_implementation :vfunc_return_enum, proc {| | 
| 621 | 
            +
                    info.install_vfunc_implementation :vfunc_return_enum, proc { |_obj| :value2 }
         | 
| 619 622 | 
             
                  end
         | 
| 620 623 | 
             
                  derived_instance.vfunc_return_enum.must_equal :value2
         | 
| 621 624 | 
             
                end
         | 
| 622 625 |  | 
| 623 | 
            -
                it  | 
| 626 | 
            +
                it 'has a working method #vfunc_return_value_and_multiple_out_parameters' do
         | 
| 624 627 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 625 628 | 
             
                    info.install_vfunc_implementation(
         | 
| 626 629 | 
             
                      :vfunc_return_value_and_multiple_out_parameters,
         | 
| 627 | 
            -
                      proc {|* | 
| 630 | 
            +
                      proc { |*_args| [42, -142, 3] })
         | 
| 628 631 | 
             
                  end
         | 
| 629 632 | 
             
                  derived_instance.vfunc_return_value_and_multiple_out_parameters.
         | 
| 630 633 | 
             
                    must_equal [42, -142, 3]
         | 
| 631 634 | 
             
                end
         | 
| 632 635 |  | 
| 633 | 
            -
                it  | 
| 636 | 
            +
                it 'has a working method #vfunc_return_value_and_one_out_parameter' do
         | 
| 634 637 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 635 638 | 
             
                    info.install_vfunc_implementation(
         | 
| 636 639 | 
             
                      :vfunc_return_value_and_one_out_parameter,
         | 
| 637 | 
            -
                      proc {|* | 
| 640 | 
            +
                      proc { |*_args| [42, -142] })
         | 
| 638 641 | 
             
                  end
         | 
| 639 642 | 
             
                  derived_instance.vfunc_return_value_and_one_out_parameter.
         | 
| 640 643 | 
             
                    must_equal [42, -142]
         | 
| 641 644 | 
             
                end
         | 
| 642 645 |  | 
| 643 | 
            -
                it  | 
| 646 | 
            +
                it 'has a working method #vfunc_return_value_only' do
         | 
| 644 647 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 645 | 
            -
                    info.install_vfunc_implementation :vfunc_return_value_only, proc {| | 
| 648 | 
            +
                    info.install_vfunc_implementation :vfunc_return_value_only, proc { |_obj| 0x1234_5678 }
         | 
| 646 649 | 
             
                  end
         | 
| 647 650 | 
             
                  result = derived_instance.vfunc_return_value_only
         | 
| 648 651 | 
             
                  result.must_equal 0x1234_5678
         | 
| 649 652 | 
             
                end
         | 
| 650 653 |  | 
| 651 | 
            -
                it  | 
| 652 | 
            -
                  skip unless get_method_introspection_data( | 
| 653 | 
            -
                                                             | 
| 654 | 
            +
                it 'has a working method #vfunc_with_callback' do
         | 
| 655 | 
            +
                  skip unless get_method_introspection_data('GIMarshallingTests', 'Object',
         | 
| 656 | 
            +
                                                            'vfunc_with_callback')
         | 
| 654 657 |  | 
| 655 658 | 
             
                  result = 1
         | 
| 656 659 |  | 
| 657 660 | 
             
                  derived_instance = make_derived_instance do |info|
         | 
| 658 | 
            -
                    info.install_vfunc_implementation :vfunc_with_callback, proc { | | 
| 661 | 
            +
                    info.install_vfunc_implementation :vfunc_with_callback, proc { |_obj, callback, callback_data|
         | 
| 659 662 | 
             
                      callback.call(42, callback_data)
         | 
| 660 663 | 
             
                    }
         | 
| 661 664 | 
             
                  end
         | 
| @@ -669,42 +672,42 @@ describe GIMarshallingTests do | |
| 669 672 | 
             
                end
         | 
| 670 673 |  | 
| 671 674 | 
             
                describe "its 'int' property" do
         | 
| 672 | 
            -
                  it  | 
| 673 | 
            -
                    assert_equal 42, instance.get_property( | 
| 675 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 676 | 
            +
                    assert_equal 42, instance.get_property('int').get_value
         | 
| 674 677 | 
             
                  end
         | 
| 675 | 
            -
                  it  | 
| 678 | 
            +
                  it 'can be retrieved with #int' do
         | 
| 676 679 | 
             
                    assert_equal 42, instance.int
         | 
| 677 680 | 
             
                  end
         | 
| 678 | 
            -
                  it  | 
| 679 | 
            -
                    instance.set_property( | 
| 680 | 
            -
                    assert_equal 13, instance.get_property( | 
| 681 | 
            +
                  it 'can be set with #set_property' do
         | 
| 682 | 
            +
                    instance.set_property('int', 13)
         | 
| 683 | 
            +
                    assert_equal 13, instance.get_property('int').get_value
         | 
| 681 684 | 
             
                  end
         | 
| 682 | 
            -
                  it  | 
| 685 | 
            +
                  it 'can be set with #int=' do
         | 
| 683 686 | 
             
                    instance.int = 1
         | 
| 684 687 | 
             
                    assert_equal 1, instance.int
         | 
| 685 688 | 
             
                  end
         | 
| 686 689 | 
             
                end
         | 
| 687 690 | 
             
              end
         | 
| 688 691 |  | 
| 689 | 
            -
              describe  | 
| 690 | 
            -
                it  | 
| 692 | 
            +
              describe 'GIMarshallingTests::OverridesObject' do
         | 
| 693 | 
            +
                it 'creates an instance using #new' do
         | 
| 691 694 | 
             
                  ob = GIMarshallingTests::OverridesObject.new
         | 
| 692 695 | 
             
                  assert_instance_of GIMarshallingTests::OverridesObject, ob
         | 
| 693 696 | 
             
                end
         | 
| 694 697 |  | 
| 695 | 
            -
                it  | 
| 698 | 
            +
                it 'has a working function #returnv' do
         | 
| 696 699 | 
             
                  ob = GIMarshallingTests::OverridesObject.returnv
         | 
| 697 700 | 
             
                  assert_instance_of GIMarshallingTests::OverridesObject, ob
         | 
| 698 701 | 
             
                end
         | 
| 699 702 |  | 
| 700 703 | 
             
                let(:instance) { GIMarshallingTests::OverridesObject.new }
         | 
| 701 704 |  | 
| 702 | 
            -
                it  | 
| 705 | 
            +
                it 'has a working method #method' do
         | 
| 703 706 | 
             
                  result = instance.method
         | 
| 704 707 | 
             
                  result.must_equal 42
         | 
| 705 708 | 
             
                end
         | 
| 706 709 |  | 
| 707 | 
            -
                it  | 
| 710 | 
            +
                it 'does not have field accessor methods' do
         | 
| 708 711 | 
             
                  assert_raises(NoMethodError) { instance.parent_instance }
         | 
| 709 712 | 
             
                  assert_raises(NoMethodError) { instance.parent_instance = nil }
         | 
| 710 713 | 
             
                  assert_raises(NoMethodError) { instance.long_ }
         | 
| @@ -712,57 +715,57 @@ describe GIMarshallingTests do | |
| 712 715 | 
             
                end
         | 
| 713 716 | 
             
              end
         | 
| 714 717 |  | 
| 715 | 
            -
              describe  | 
| 718 | 
            +
              describe 'GIMarshallingTests::OverridesStruct' do
         | 
| 716 719 | 
             
                let(:instance) { GIMarshallingTests::OverridesStruct.new }
         | 
| 717 720 |  | 
| 718 | 
            -
                it  | 
| 721 | 
            +
                it 'has a writable field long_' do
         | 
| 719 722 | 
             
                  instance.long_ = 43
         | 
| 720 723 | 
             
                  instance.long_.must_equal 43
         | 
| 721 724 | 
             
                end
         | 
| 722 725 |  | 
| 723 | 
            -
                it  | 
| 726 | 
            +
                it 'creates an instance using #new' do
         | 
| 724 727 | 
             
                  ob = GIMarshallingTests::OverridesStruct.new
         | 
| 725 728 | 
             
                  assert_instance_of GIMarshallingTests::OverridesStruct, ob
         | 
| 726 729 | 
             
                end
         | 
| 727 730 |  | 
| 728 | 
            -
                it  | 
| 731 | 
            +
                it 'has a working method #method' do
         | 
| 729 732 | 
             
                  instance.method.must_equal 42
         | 
| 730 733 | 
             
                end
         | 
| 731 734 |  | 
| 732 | 
            -
                it  | 
| 735 | 
            +
                it 'has a working function #returnv' do
         | 
| 733 736 | 
             
                  ob = GIMarshallingTests::OverridesStruct.returnv
         | 
| 734 737 | 
             
                  assert_instance_of GIMarshallingTests::OverridesStruct, ob
         | 
| 735 738 | 
             
                end
         | 
| 736 739 | 
             
              end
         | 
| 737 740 |  | 
| 738 | 
            -
              describe  | 
| 739 | 
            -
                it  | 
| 741 | 
            +
              describe 'GIMarshallingTests::PointerStruct' do
         | 
| 742 | 
            +
                it 'creates an instance using #new' do
         | 
| 740 743 | 
             
                  ps = GIMarshallingTests::PointerStruct.new
         | 
| 741 744 | 
             
                  assert_instance_of GIMarshallingTests::PointerStruct, ps
         | 
| 742 745 | 
             
                end
         | 
| 743 746 |  | 
| 744 747 | 
             
                let(:instance) { GIMarshallingTests::PointerStruct.new }
         | 
| 745 748 |  | 
| 746 | 
            -
                it  | 
| 749 | 
            +
                it 'has a writable field long_' do
         | 
| 747 750 | 
             
                  assert_equal 0, instance.long_
         | 
| 748 751 | 
             
                  instance.long_ = 1056
         | 
| 749 752 | 
             
                  assert_equal 1056, instance.long_
         | 
| 750 753 | 
             
                end
         | 
| 751 754 |  | 
| 752 | 
            -
                it  | 
| 755 | 
            +
                it 'has a working method #inv' do
         | 
| 753 756 | 
             
                  instance.long_ = 42
         | 
| 754 757 | 
             
                  instance.inv
         | 
| 755 758 | 
             
                  pass
         | 
| 756 759 | 
             
                end
         | 
| 757 760 |  | 
| 758 | 
            -
                it  | 
| 761 | 
            +
                it 'has a working function #returnv' do
         | 
| 759 762 | 
             
                  ob = GIMarshallingTests::PointerStruct.returnv
         | 
| 760 763 | 
             
                  assert_instance_of GIMarshallingTests::PointerStruct, ob
         | 
| 761 764 | 
             
                end
         | 
| 762 765 | 
             
              end
         | 
| 763 766 |  | 
| 764 | 
            -
              describe  | 
| 765 | 
            -
                it  | 
| 767 | 
            +
              describe 'GIMarshallingTests::PropertiesObject' do
         | 
| 768 | 
            +
                it 'creates an instance using #new' do
         | 
| 766 769 | 
             
                  ob = GIMarshallingTests::PropertiesObject.new
         | 
| 767 770 | 
             
                  assert_instance_of GIMarshallingTests::PropertiesObject, ob
         | 
| 768 771 | 
             
                end
         | 
| @@ -770,22 +773,22 @@ describe GIMarshallingTests do | |
| 770 773 | 
             
                let(:instance) { GIMarshallingTests::PropertiesObject.new }
         | 
| 771 774 |  | 
| 772 775 | 
             
                describe "its 'some-boolean' property" do
         | 
| 773 | 
            -
                  it  | 
| 774 | 
            -
                    instance.get_property( | 
| 776 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 777 | 
            +
                    instance.get_property('some-boolean').get_value.must_equal false
         | 
| 775 778 | 
             
                  end
         | 
| 776 779 |  | 
| 777 | 
            -
                  it  | 
| 780 | 
            +
                  it 'can be retrieved with #some_boolean' do
         | 
| 778 781 | 
             
                    instance.some_boolean.must_equal false
         | 
| 779 782 | 
             
                  end
         | 
| 780 783 |  | 
| 781 | 
            -
                  it  | 
| 782 | 
            -
                    instance.set_property( | 
| 783 | 
            -
                    instance.get_property( | 
| 784 | 
            +
                  it 'can be set with #set_property' do
         | 
| 785 | 
            +
                    instance.set_property('some-boolean', true)
         | 
| 786 | 
            +
                    instance.get_property('some-boolean').get_value.must_equal true
         | 
| 784 787 | 
             
                  end
         | 
| 785 788 |  | 
| 786 | 
            -
                  it  | 
| 789 | 
            +
                  it 'can be set with #some_boolean=' do
         | 
| 787 790 | 
             
                    instance.some_boolean = true
         | 
| 788 | 
            -
                    instance.get_property( | 
| 791 | 
            +
                    instance.get_property('some-boolean').get_value.must_equal true
         | 
| 789 792 | 
             
                  end
         | 
| 790 793 | 
             
                end
         | 
| 791 794 |  | 
| @@ -796,23 +799,23 @@ describe GIMarshallingTests do | |
| 796 799 | 
             
                                                                'some-boxed-glist')
         | 
| 797 800 | 
             
                  end
         | 
| 798 801 |  | 
| 799 | 
            -
                  it  | 
| 800 | 
            -
                    instance.get_property( | 
| 802 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 803 | 
            +
                    instance.get_property('some-boxed-glist').get_value.must_equal nil
         | 
| 801 804 | 
             
                  end
         | 
| 802 805 |  | 
| 803 | 
            -
                  it  | 
| 806 | 
            +
                  it 'can be retrieved with #some_boxed_glist' do
         | 
| 804 807 | 
             
                    instance.some_boxed_glist.must_equal nil
         | 
| 805 808 | 
             
                  end
         | 
| 806 809 |  | 
| 807 | 
            -
                  it  | 
| 808 | 
            -
                    instance.set_property_extended( | 
| 810 | 
            +
                  it 'can be set with #set_property_extended' do
         | 
| 811 | 
            +
                    instance.set_property_extended('some-boxed-glist', [1, 2, 3])
         | 
| 809 812 | 
             
                    instance.some_boxed_glist.to_a.must_equal [1, 2, 3]
         | 
| 810 813 | 
             
                  end
         | 
| 811 814 |  | 
| 812 | 
            -
                  it  | 
| 815 | 
            +
                  it 'can be set with #some_boxed_glist=' do
         | 
| 813 816 | 
             
                    instance.some_boxed_glist = [1, 2, 3]
         | 
| 814 817 | 
             
                    instance.some_boxed_glist.to_a.must_equal [1, 2, 3]
         | 
| 815 | 
            -
                    instance.get_property_extended( | 
| 818 | 
            +
                    instance.get_property_extended('some-boxed-glist').to_a.must_equal [1, 2, 3]
         | 
| 816 819 | 
             
                  end
         | 
| 817 820 | 
             
                end
         | 
| 818 821 |  | 
| @@ -823,22 +826,22 @@ describe GIMarshallingTests do | |
| 823 826 | 
             
                                                                'some-boxed-struct')
         | 
| 824 827 | 
             
                  end
         | 
| 825 828 |  | 
| 826 | 
            -
                  it  | 
| 827 | 
            -
                    instance.get_property( | 
| 829 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 830 | 
            +
                    instance.get_property('some-boxed-struct').get_value.must_equal nil
         | 
| 828 831 | 
             
                  end
         | 
| 829 832 |  | 
| 830 | 
            -
                  it  | 
| 833 | 
            +
                  it 'can be retrieved with #some_boxed_struct' do
         | 
| 831 834 | 
             
                    instance.some_boxed_struct.must_equal nil
         | 
| 832 835 | 
             
                  end
         | 
| 833 836 |  | 
| 834 | 
            -
                  it  | 
| 837 | 
            +
                  it 'can be set with #set_property' do
         | 
| 835 838 | 
             
                    boxed = GIMarshallingTests::BoxedStruct.new
         | 
| 836 839 | 
             
                    boxed.long_ = 42
         | 
| 837 | 
            -
                    instance.set_property( | 
| 838 | 
            -
                    instance.get_property( | 
| 840 | 
            +
                    instance.set_property('some-boxed-struct', boxed)
         | 
| 841 | 
            +
                    instance.get_property('some-boxed-struct').get_value.long_.must_equal 42
         | 
| 839 842 | 
             
                  end
         | 
| 840 843 |  | 
| 841 | 
            -
                  it  | 
| 844 | 
            +
                  it 'can be set with #some_boxed_struct=' do
         | 
| 842 845 | 
             
                    boxed = GIMarshallingTests::BoxedStruct.new
         | 
| 843 846 | 
             
                    boxed.long_ = 43
         | 
| 844 847 | 
             
                    instance.some_boxed_struct = boxed
         | 
| @@ -847,120 +850,120 @@ describe GIMarshallingTests do | |
| 847 850 | 
             
                end
         | 
| 848 851 |  | 
| 849 852 | 
             
                describe "its 'some-char' property" do
         | 
| 850 | 
            -
                  it  | 
| 851 | 
            -
                    instance.get_property( | 
| 853 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 854 | 
            +
                    instance.get_property('some-char').get_value.must_equal 0
         | 
| 852 855 | 
             
                  end
         | 
| 853 856 |  | 
| 854 | 
            -
                  it  | 
| 857 | 
            +
                  it 'can be retrieved with #some_char' do
         | 
| 855 858 | 
             
                    instance.some_char.must_equal 0
         | 
| 856 859 | 
             
                  end
         | 
| 857 860 |  | 
| 858 | 
            -
                  it  | 
| 859 | 
            -
                    instance.set_property  | 
| 860 | 
            -
                    instance.get_property( | 
| 861 | 
            +
                  it 'can be set with #set_property' do
         | 
| 862 | 
            +
                    instance.set_property 'some-char', 42
         | 
| 863 | 
            +
                    instance.get_property('some-char').get_value.must_equal 42
         | 
| 861 864 | 
             
                  end
         | 
| 862 865 |  | 
| 863 | 
            -
                  it  | 
| 866 | 
            +
                  it 'can be set with #some_char=' do
         | 
| 864 867 | 
             
                    instance.some_char = 43
         | 
| 865 868 | 
             
                    instance.some_char.must_equal 43
         | 
| 866 869 | 
             
                  end
         | 
| 867 870 | 
             
                end
         | 
| 868 871 |  | 
| 869 872 | 
             
                describe "its 'some-double' property" do
         | 
| 870 | 
            -
                  it  | 
| 871 | 
            -
                    instance.get_property( | 
| 873 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 874 | 
            +
                    instance.get_property('some-double').get_value.must_equal 0.0
         | 
| 872 875 | 
             
                  end
         | 
| 873 876 |  | 
| 874 | 
            -
                  it  | 
| 877 | 
            +
                  it 'can be retrieved with #some_double' do
         | 
| 875 878 | 
             
                    instance.some_double.must_equal 0.0
         | 
| 876 879 | 
             
                  end
         | 
| 877 880 |  | 
| 878 | 
            -
                  it  | 
| 879 | 
            -
                    instance.set_property( | 
| 880 | 
            -
                    instance.get_property( | 
| 881 | 
            +
                  it 'can be set with #set_property' do
         | 
| 882 | 
            +
                    instance.set_property('some-double', 3.14)
         | 
| 883 | 
            +
                    instance.get_property('some-double').get_value.must_equal 3.14
         | 
| 881 884 | 
             
                  end
         | 
| 882 885 |  | 
| 883 | 
            -
                  it  | 
| 886 | 
            +
                  it 'can be set with #some_double=' do
         | 
| 884 887 | 
             
                    instance.some_double = 3.14
         | 
| 885 888 | 
             
                    instance.some_double.must_equal 3.14
         | 
| 886 889 | 
             
                  end
         | 
| 887 890 | 
             
                end
         | 
| 888 891 |  | 
| 889 892 | 
             
                describe "its 'some-float' property" do
         | 
| 890 | 
            -
                  it  | 
| 891 | 
            -
                    instance.get_property( | 
| 893 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 894 | 
            +
                    instance.get_property('some-float').get_value.must_equal 0.0
         | 
| 892 895 | 
             
                  end
         | 
| 893 896 |  | 
| 894 | 
            -
                  it  | 
| 897 | 
            +
                  it 'can be retrieved with #some_float' do
         | 
| 895 898 | 
             
                    instance.some_float.must_equal 0.0
         | 
| 896 899 | 
             
                  end
         | 
| 897 900 |  | 
| 898 | 
            -
                  it  | 
| 899 | 
            -
                    instance.set_property( | 
| 900 | 
            -
                    instance.get_property( | 
| 901 | 
            +
                  it 'can be set with #set_property' do
         | 
| 902 | 
            +
                    instance.set_property('some-float', 3.14)
         | 
| 903 | 
            +
                    instance.get_property('some-float').get_value.must_be_close_to 3.14
         | 
| 901 904 | 
             
                  end
         | 
| 902 905 |  | 
| 903 | 
            -
                  it  | 
| 906 | 
            +
                  it 'can be set with #some_float=' do
         | 
| 904 907 | 
             
                    instance.some_float = 3.14
         | 
| 905 908 | 
             
                    instance.some_float.must_be_close_to 3.14
         | 
| 906 909 | 
             
                  end
         | 
| 907 910 | 
             
                end
         | 
| 908 911 |  | 
| 909 912 | 
             
                describe "its 'some-int' property" do
         | 
| 910 | 
            -
                  it  | 
| 911 | 
            -
                    instance.get_property( | 
| 913 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 914 | 
            +
                    instance.get_property('some-int').get_value.must_equal 0
         | 
| 912 915 | 
             
                  end
         | 
| 913 916 |  | 
| 914 | 
            -
                  it  | 
| 917 | 
            +
                  it 'can be retrieved with #some_int' do
         | 
| 915 918 | 
             
                    instance.some_int.must_equal 0
         | 
| 916 919 | 
             
                  end
         | 
| 917 920 |  | 
| 918 | 
            -
                  it  | 
| 919 | 
            -
                    instance.set_property  | 
| 920 | 
            -
                    instance.get_property( | 
| 921 | 
            +
                  it 'can be set with #set_property' do
         | 
| 922 | 
            +
                    instance.set_property 'some-int', 4242
         | 
| 923 | 
            +
                    instance.get_property('some-int').get_value.must_equal 4242
         | 
| 921 924 | 
             
                  end
         | 
| 922 925 |  | 
| 923 | 
            -
                  it  | 
| 926 | 
            +
                  it 'can be set with #some_int=' do
         | 
| 924 927 | 
             
                    instance.some_int = 4243
         | 
| 925 928 | 
             
                    instance.some_int.must_equal 4243
         | 
| 926 929 | 
             
                  end
         | 
| 927 930 | 
             
                end
         | 
| 928 931 |  | 
| 929 932 | 
             
                describe "its 'some-int64' property" do
         | 
| 930 | 
            -
                  it  | 
| 931 | 
            -
                    instance.get_property( | 
| 933 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 934 | 
            +
                    instance.get_property('some-int64').get_value.must_equal 0
         | 
| 932 935 | 
             
                  end
         | 
| 933 936 |  | 
| 934 | 
            -
                  it  | 
| 937 | 
            +
                  it 'can be retrieved with #some_int64' do
         | 
| 935 938 | 
             
                    instance.some_int64.must_equal 0
         | 
| 936 939 | 
             
                  end
         | 
| 937 940 |  | 
| 938 | 
            -
                  it  | 
| 939 | 
            -
                    instance.set_property  | 
| 940 | 
            -
                    instance.get_property( | 
| 941 | 
            +
                  it 'can be set with #set_property' do
         | 
| 942 | 
            +
                    instance.set_property 'some-int64', 42_000_000_000_000
         | 
| 943 | 
            +
                    instance.get_property('some-int64').get_value.must_equal 42_000_000_000_000
         | 
| 941 944 | 
             
                  end
         | 
| 942 945 |  | 
| 943 | 
            -
                  it  | 
| 946 | 
            +
                  it 'can be set with #some_int64=' do
         | 
| 944 947 | 
             
                    instance.some_int64 = 43_000_000_000_000
         | 
| 945 948 | 
             
                    instance.some_int64.must_equal 43_000_000_000_000
         | 
| 946 949 | 
             
                  end
         | 
| 947 950 | 
             
                end
         | 
| 948 951 |  | 
| 949 952 | 
             
                describe "its 'some-long' property" do
         | 
| 950 | 
            -
                  it  | 
| 951 | 
            -
                    instance.get_property( | 
| 953 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 954 | 
            +
                    instance.get_property('some-long').get_value.must_equal 0
         | 
| 952 955 | 
             
                  end
         | 
| 953 956 |  | 
| 954 | 
            -
                  it  | 
| 957 | 
            +
                  it 'can be retrieved with #some_long' do
         | 
| 955 958 | 
             
                    instance.some_long.must_equal 0
         | 
| 956 959 | 
             
                  end
         | 
| 957 960 |  | 
| 958 | 
            -
                  it  | 
| 959 | 
            -
                    instance.set_property  | 
| 960 | 
            -
                    instance.get_property( | 
| 961 | 
            +
                  it 'can be set with #set_property' do
         | 
| 962 | 
            +
                    instance.set_property 'some-long', 4242
         | 
| 963 | 
            +
                    instance.get_property('some-long').get_value.must_equal 4242
         | 
| 961 964 | 
             
                  end
         | 
| 962 965 |  | 
| 963 | 
            -
                  it  | 
| 966 | 
            +
                  it 'can be set with #some_long=' do
         | 
| 964 967 | 
             
                    instance.some_long = 4243
         | 
| 965 968 | 
             
                    instance.some_long.must_equal 4243
         | 
| 966 969 | 
             
                  end
         | 
| @@ -973,21 +976,21 @@ describe GIMarshallingTests do | |
| 973 976 | 
             
                                                                'some-object')
         | 
| 974 977 | 
             
                  end
         | 
| 975 978 |  | 
| 976 | 
            -
                  it  | 
| 977 | 
            -
                    instance.get_property( | 
| 979 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 980 | 
            +
                    instance.get_property('some-object').get_value.must_be_nil
         | 
| 978 981 | 
             
                  end
         | 
| 979 982 |  | 
| 980 | 
            -
                  it  | 
| 983 | 
            +
                  it 'can be retrieved with #some_object' do
         | 
| 981 984 | 
             
                    instance.some_object.must_be_nil
         | 
| 982 985 | 
             
                  end
         | 
| 983 986 |  | 
| 984 | 
            -
                  it  | 
| 987 | 
            +
                  it 'can be set with #set_property' do
         | 
| 985 988 | 
             
                    ob = GIMarshallingTests::Object.new 42
         | 
| 986 | 
            -
                    instance.set_property  | 
| 987 | 
            -
                    instance.get_property( | 
| 989 | 
            +
                    instance.set_property 'some-object', ob
         | 
| 990 | 
            +
                    instance.get_property('some-object').get_value.must_equal ob
         | 
| 988 991 | 
             
                  end
         | 
| 989 992 |  | 
| 990 | 
            -
                  it  | 
| 993 | 
            +
                  it 'can be set with #some_object=' do
         | 
| 991 994 | 
             
                    ob = GIMarshallingTests::Object.new 42
         | 
| 992 995 | 
             
                    instance.some_object = ob
         | 
| 993 996 | 
             
                    instance.some_object.must_equal ob
         | 
| @@ -1001,100 +1004,100 @@ describe GIMarshallingTests do | |
| 1001 1004 | 
             
                                                                'some-strv')
         | 
| 1002 1005 | 
             
                  end
         | 
| 1003 1006 |  | 
| 1004 | 
            -
                  it  | 
| 1005 | 
            -
                    instance.get_property( | 
| 1007 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 1008 | 
            +
                    instance.get_property('some-strv').get_value.must_be :==, []
         | 
| 1006 1009 | 
             
                  end
         | 
| 1007 1010 |  | 
| 1008 | 
            -
                  it  | 
| 1011 | 
            +
                  it 'can be retrieved with #some_strv' do
         | 
| 1009 1012 | 
             
                    instance.some_strv.must_be :==, []
         | 
| 1010 1013 | 
             
                  end
         | 
| 1011 1014 |  | 
| 1012 | 
            -
                  it  | 
| 1013 | 
            -
                    instance.set_property_extended( | 
| 1014 | 
            -
                    instance.get_property( | 
| 1015 | 
            +
                  it 'can be set with #set_property_extended' do
         | 
| 1016 | 
            +
                    instance.set_property_extended('some-strv', %w(foo bar))
         | 
| 1017 | 
            +
                    instance.get_property('some-strv').get_value.must_be :==, %w(foo bar)
         | 
| 1015 1018 | 
             
                  end
         | 
| 1016 1019 |  | 
| 1017 | 
            -
                  it  | 
| 1018 | 
            -
                    instance.some_strv =  | 
| 1019 | 
            -
                    instance.some_strv.must_be :==,  | 
| 1020 | 
            +
                  it 'can be set with #some_strv=' do
         | 
| 1021 | 
            +
                    instance.some_strv = %w(foo bar)
         | 
| 1022 | 
            +
                    instance.some_strv.must_be :==, %w(foo bar)
         | 
| 1020 1023 | 
             
                  end
         | 
| 1021 1024 | 
             
                end
         | 
| 1022 1025 |  | 
| 1023 1026 | 
             
                describe "its 'some-uchar' property" do
         | 
| 1024 | 
            -
                  it  | 
| 1025 | 
            -
                    instance.get_property( | 
| 1027 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 1028 | 
            +
                    instance.get_property('some-uchar').get_value.must_equal 0
         | 
| 1026 1029 | 
             
                  end
         | 
| 1027 1030 |  | 
| 1028 | 
            -
                  it  | 
| 1031 | 
            +
                  it 'can be retrieved with #some_uchar' do
         | 
| 1029 1032 | 
             
                    instance.some_uchar.must_equal 0
         | 
| 1030 1033 | 
             
                  end
         | 
| 1031 1034 |  | 
| 1032 | 
            -
                  it  | 
| 1033 | 
            -
                    instance.set_property  | 
| 1034 | 
            -
                    instance.get_property( | 
| 1035 | 
            +
                  it 'can be set with #set_property' do
         | 
| 1036 | 
            +
                    instance.set_property 'some-uchar', 42
         | 
| 1037 | 
            +
                    instance.get_property('some-uchar').get_value.must_equal 42
         | 
| 1035 1038 | 
             
                  end
         | 
| 1036 1039 |  | 
| 1037 | 
            -
                  it  | 
| 1040 | 
            +
                  it 'can be set with #some_uchar=' do
         | 
| 1038 1041 | 
             
                    instance.some_uchar = 43
         | 
| 1039 1042 | 
             
                    instance.some_uchar.must_equal 43
         | 
| 1040 1043 | 
             
                  end
         | 
| 1041 1044 | 
             
                end
         | 
| 1042 1045 |  | 
| 1043 1046 | 
             
                describe "its 'some-uint' property" do
         | 
| 1044 | 
            -
                  it  | 
| 1045 | 
            -
                    instance.get_property( | 
| 1047 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 1048 | 
            +
                    instance.get_property('some-uint').get_value.must_equal 0
         | 
| 1046 1049 | 
             
                  end
         | 
| 1047 1050 |  | 
| 1048 | 
            -
                  it  | 
| 1051 | 
            +
                  it 'can be retrieved with #some_uint' do
         | 
| 1049 1052 | 
             
                    instance.some_uint.must_equal 0
         | 
| 1050 1053 | 
             
                  end
         | 
| 1051 1054 |  | 
| 1052 | 
            -
                  it  | 
| 1053 | 
            -
                    instance.set_property  | 
| 1054 | 
            -
                    instance.get_property( | 
| 1055 | 
            +
                  it 'can be set with #set_property' do
         | 
| 1056 | 
            +
                    instance.set_property 'some-uint', 4242
         | 
| 1057 | 
            +
                    instance.get_property('some-uint').get_value.must_equal 4242
         | 
| 1055 1058 | 
             
                  end
         | 
| 1056 1059 |  | 
| 1057 | 
            -
                  it  | 
| 1060 | 
            +
                  it 'can be set with #some_uint=' do
         | 
| 1058 1061 | 
             
                    instance.some_uint = 4243
         | 
| 1059 1062 | 
             
                    instance.some_uint.must_equal 4243
         | 
| 1060 1063 | 
             
                  end
         | 
| 1061 1064 | 
             
                end
         | 
| 1062 1065 |  | 
| 1063 1066 | 
             
                describe "its 'some-uint64' property" do
         | 
| 1064 | 
            -
                  it  | 
| 1065 | 
            -
                    instance.get_property( | 
| 1067 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 1068 | 
            +
                    instance.get_property('some-uint64').get_value.must_equal 0
         | 
| 1066 1069 | 
             
                  end
         | 
| 1067 1070 |  | 
| 1068 | 
            -
                  it  | 
| 1071 | 
            +
                  it 'can be retrieved with #some_uint64' do
         | 
| 1069 1072 | 
             
                    instance.some_uint64.must_equal 0
         | 
| 1070 1073 | 
             
                  end
         | 
| 1071 1074 |  | 
| 1072 | 
            -
                  it  | 
| 1073 | 
            -
                    instance.set_property  | 
| 1074 | 
            -
                    instance.get_property( | 
| 1075 | 
            +
                  it 'can be set with #set_property' do
         | 
| 1076 | 
            +
                    instance.set_property 'some-uint64', 42_000_000_000_000
         | 
| 1077 | 
            +
                    instance.get_property('some-uint64').get_value.must_equal 42_000_000_000_000
         | 
| 1075 1078 | 
             
                  end
         | 
| 1076 1079 |  | 
| 1077 | 
            -
                  it  | 
| 1080 | 
            +
                  it 'can be set with #some_uint64=' do
         | 
| 1078 1081 | 
             
                    instance.some_uint64 = 43_000_000_000_000
         | 
| 1079 1082 | 
             
                    instance.some_uint64.must_equal 43_000_000_000_000
         | 
| 1080 1083 | 
             
                  end
         | 
| 1081 1084 | 
             
                end
         | 
| 1082 1085 |  | 
| 1083 1086 | 
             
                describe "its 'some-ulong' property" do
         | 
| 1084 | 
            -
                  it  | 
| 1085 | 
            -
                    instance.get_property( | 
| 1087 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 1088 | 
            +
                    instance.get_property('some-ulong').get_value.must_equal 0
         | 
| 1086 1089 | 
             
                  end
         | 
| 1087 1090 |  | 
| 1088 | 
            -
                  it  | 
| 1091 | 
            +
                  it 'can be retrieved with #some_ulong' do
         | 
| 1089 1092 | 
             
                    instance.some_ulong.must_equal 0
         | 
| 1090 1093 | 
             
                  end
         | 
| 1091 1094 |  | 
| 1092 | 
            -
                  it  | 
| 1093 | 
            -
                    instance.set_property  | 
| 1094 | 
            -
                    instance.get_property( | 
| 1095 | 
            +
                  it 'can be set with #set_property' do
         | 
| 1096 | 
            +
                    instance.set_property 'some-ulong', 4242
         | 
| 1097 | 
            +
                    instance.get_property('some-ulong').get_value.must_equal 4242
         | 
| 1095 1098 | 
             
                  end
         | 
| 1096 1099 |  | 
| 1097 | 
            -
                  it  | 
| 1100 | 
            +
                  it 'can be set with #some_ulong=' do
         | 
| 1098 1101 | 
             
                    instance.some_ulong = 4243
         | 
| 1099 1102 | 
             
                    instance.some_ulong.must_equal 4243
         | 
| 1100 1103 | 
             
                  end
         | 
| @@ -1107,313 +1110,313 @@ describe GIMarshallingTests do | |
| 1107 1110 | 
             
                                                                'some-variant')
         | 
| 1108 1111 | 
             
                  end
         | 
| 1109 1112 |  | 
| 1110 | 
            -
                  it  | 
| 1111 | 
            -
                    instance.get_property( | 
| 1113 | 
            +
                  it 'can be retrieved with #get_property' do
         | 
| 1114 | 
            +
                    instance.get_property('some-variant').get_value.must_be_nil
         | 
| 1112 1115 | 
             
                  end
         | 
| 1113 1116 |  | 
| 1114 | 
            -
                  it  | 
| 1117 | 
            +
                  it 'can be retrieved with #some_variant' do
         | 
| 1115 1118 | 
             
                    instance.some_variant.must_be_nil
         | 
| 1116 1119 | 
             
                  end
         | 
| 1117 1120 |  | 
| 1118 | 
            -
                  it  | 
| 1119 | 
            -
                    value = GLib::Variant.new_string( | 
| 1120 | 
            -
                    instance.set_property  | 
| 1121 | 
            -
                    instance.get_property( | 
| 1121 | 
            +
                  it 'can be set with #set_property' do
         | 
| 1122 | 
            +
                    value = GLib::Variant.new_string('Foo')
         | 
| 1123 | 
            +
                    instance.set_property 'some-variant', value
         | 
| 1124 | 
            +
                    instance.get_property('some-variant').get_value.must_equal value
         | 
| 1122 1125 | 
             
                  end
         | 
| 1123 1126 |  | 
| 1124 | 
            -
                  it  | 
| 1125 | 
            -
                    value = GLib::Variant.new_string( | 
| 1127 | 
            +
                  it 'can be set with #some_variant=' do
         | 
| 1128 | 
            +
                    value = GLib::Variant.new_string('Foo')
         | 
| 1126 1129 | 
             
                    instance.some_variant = value
         | 
| 1127 1130 | 
             
                    instance.some_variant.must_equal value
         | 
| 1128 1131 | 
             
                  end
         | 
| 1129 1132 | 
             
                end
         | 
| 1130 1133 | 
             
              end
         | 
| 1131 1134 |  | 
| 1132 | 
            -
              describe  | 
| 1133 | 
            -
                it  | 
| 1135 | 
            +
              describe 'GIMarshallingTests::SecondEnum' do
         | 
| 1136 | 
            +
                it 'has the member :secondvalue1' do
         | 
| 1134 1137 | 
             
                  assert_equal 0, GIMarshallingTests::SecondEnum[:secondvalue1]
         | 
| 1135 1138 | 
             
                end
         | 
| 1136 | 
            -
                it  | 
| 1139 | 
            +
                it 'has the member :secondvalue2' do
         | 
| 1137 1140 | 
             
                  assert_equal 1, GIMarshallingTests::SecondEnum[:secondvalue2]
         | 
| 1138 1141 | 
             
                end
         | 
| 1139 1142 | 
             
              end
         | 
| 1140 1143 |  | 
| 1141 | 
            -
              describe  | 
| 1142 | 
            -
                it  | 
| 1144 | 
            +
              describe 'GIMarshallingTests::SimpleStruct' do
         | 
| 1145 | 
            +
                it 'creates an instance using #new' do
         | 
| 1143 1146 | 
             
                  ss = GIMarshallingTests::SimpleStruct.new
         | 
| 1144 1147 | 
             
                  assert_instance_of GIMarshallingTests::SimpleStruct, ss
         | 
| 1145 1148 | 
             
                end
         | 
| 1146 1149 |  | 
| 1147 1150 | 
             
                let(:instance) { GIMarshallingTests::SimpleStruct.new }
         | 
| 1148 1151 |  | 
| 1149 | 
            -
                it  | 
| 1152 | 
            +
                it 'has a writable field long_' do
         | 
| 1150 1153 | 
             
                  instance.long_.must_equal 0
         | 
| 1151 1154 | 
             
                  instance.long_ = 1056
         | 
| 1152 1155 | 
             
                  instance.long_.must_equal 1056
         | 
| 1153 1156 | 
             
                end
         | 
| 1154 1157 |  | 
| 1155 | 
            -
                it  | 
| 1158 | 
            +
                it 'has a writable field int8' do
         | 
| 1156 1159 | 
             
                  instance.int8.must_equal 0
         | 
| 1157 1160 | 
             
                  instance.int8 = -43
         | 
| 1158 1161 | 
             
                  instance.int8.must_equal(-43)
         | 
| 1159 1162 | 
             
                end
         | 
| 1160 1163 |  | 
| 1161 | 
            -
                it  | 
| 1164 | 
            +
                it 'has a working method #inv' do
         | 
| 1162 1165 | 
             
                  instance.long_ = 6
         | 
| 1163 1166 | 
             
                  instance.int8 = 7
         | 
| 1164 1167 | 
             
                  instance.inv
         | 
| 1165 1168 | 
             
                  pass
         | 
| 1166 1169 | 
             
                end
         | 
| 1167 1170 |  | 
| 1168 | 
            -
                it  | 
| 1171 | 
            +
                it 'has a working method #method' do
         | 
| 1169 1172 | 
             
                  instance.long_ = 6
         | 
| 1170 1173 | 
             
                  instance.int8 = 7
         | 
| 1171 1174 | 
             
                  instance.method
         | 
| 1172 1175 | 
             
                  pass
         | 
| 1173 1176 | 
             
                end
         | 
| 1174 1177 |  | 
| 1175 | 
            -
                it  | 
| 1178 | 
            +
                it 'has a working function #returnv' do
         | 
| 1176 1179 | 
             
                  ss = GIMarshallingTests::SimpleStruct.returnv
         | 
| 1177 1180 | 
             
                  assert_instance_of GIMarshallingTests::SimpleStruct, ss
         | 
| 1178 1181 | 
             
                end
         | 
| 1179 1182 | 
             
              end
         | 
| 1180 1183 |  | 
| 1181 | 
            -
              describe  | 
| 1182 | 
            -
                it  | 
| 1184 | 
            +
              describe 'GIMarshallingTests::SubObject' do
         | 
| 1185 | 
            +
                it 'creates an instance using #new' do
         | 
| 1183 1186 | 
             
                  so = GIMarshallingTests::SubObject.new 42
         | 
| 1184 1187 | 
             
                  assert_instance_of GIMarshallingTests::SubObject, so
         | 
| 1185 1188 | 
             
                end
         | 
| 1186 1189 |  | 
| 1187 1190 | 
             
                let(:instance) { GIMarshallingTests::SubObject.new 0 }
         | 
| 1188 1191 |  | 
| 1189 | 
            -
                it  | 
| 1192 | 
            +
                it 'has a working method #overwritten_method' do
         | 
| 1190 1193 | 
             
                  instance.overwritten_method
         | 
| 1191 1194 | 
             
                  pass
         | 
| 1192 1195 | 
             
                end
         | 
| 1193 1196 |  | 
| 1194 | 
            -
                it  | 
| 1197 | 
            +
                it 'has a working method #sub_method' do
         | 
| 1195 1198 | 
             
                  instance.sub_method
         | 
| 1196 1199 | 
             
                  pass
         | 
| 1197 1200 | 
             
                end
         | 
| 1198 1201 |  | 
| 1199 | 
            -
                it  | 
| 1202 | 
            +
                it 'does not have field accessors' do
         | 
| 1200 1203 | 
             
                  assert_raises(NoMethodError) { instance.parent_instance }
         | 
| 1201 1204 | 
             
                  assert_raises(NoMethodError) { instance.parent_instance = nil }
         | 
| 1202 1205 | 
             
                end
         | 
| 1203 1206 | 
             
              end
         | 
| 1204 1207 |  | 
| 1205 | 
            -
              describe  | 
| 1206 | 
            -
                it  | 
| 1208 | 
            +
              describe 'GIMarshallingTests::SubSubObject' do
         | 
| 1209 | 
            +
                it 'creates an instance using #new' do
         | 
| 1207 1210 | 
             
                  so = GIMarshallingTests::SubSubObject.new 42
         | 
| 1208 1211 | 
             
                  assert_instance_of GIMarshallingTests::SubSubObject, so
         | 
| 1209 1212 | 
             
                end
         | 
| 1210 1213 |  | 
| 1211 1214 | 
             
                let(:instance) { GIMarshallingTests::SubSubObject.new 0 }
         | 
| 1212 1215 |  | 
| 1213 | 
            -
                it  | 
| 1216 | 
            +
                it 'does not have field accessors' do
         | 
| 1214 1217 | 
             
                  assert_raises(NoMethodError) { instance.parent_instance }
         | 
| 1215 1218 | 
             
                  assert_raises(NoMethodError) { instance.parent_instance = nil }
         | 
| 1216 1219 | 
             
                end
         | 
| 1217 1220 | 
             
              end
         | 
| 1218 1221 |  | 
| 1219 | 
            -
              describe  | 
| 1220 | 
            -
                it  | 
| 1222 | 
            +
              describe 'GIMarshallingTests::Union' do
         | 
| 1223 | 
            +
                it 'creates an instance with #new' do
         | 
| 1221 1224 | 
             
                  u = GIMarshallingTests::Union.new
         | 
| 1222 1225 | 
             
                  assert_instance_of GIMarshallingTests::Union, u
         | 
| 1223 1226 | 
             
                end
         | 
| 1224 1227 |  | 
| 1225 1228 | 
             
                let(:instance) { GIMarshallingTests::Union.new }
         | 
| 1226 1229 |  | 
| 1227 | 
            -
                it  | 
| 1230 | 
            +
                it 'has a writable field long_' do
         | 
| 1228 1231 | 
             
                  assert_equal 0, instance.long_
         | 
| 1229 1232 | 
             
                  instance.long_ = 1056
         | 
| 1230 1233 | 
             
                  assert_equal 1056, instance.long_
         | 
| 1231 1234 | 
             
                end
         | 
| 1232 1235 |  | 
| 1233 | 
            -
                it  | 
| 1236 | 
            +
                it 'has a working method #inv' do
         | 
| 1234 1237 | 
             
                  instance.long_ = 42
         | 
| 1235 1238 | 
             
                  instance.inv
         | 
| 1236 1239 | 
             
                  pass
         | 
| 1237 1240 | 
             
                end
         | 
| 1238 1241 |  | 
| 1239 | 
            -
                it  | 
| 1242 | 
            +
                it 'has a working method #method' do
         | 
| 1240 1243 | 
             
                  instance.long_ = 42
         | 
| 1241 1244 | 
             
                  instance.method
         | 
| 1242 1245 | 
             
                  pass
         | 
| 1243 1246 | 
             
                end
         | 
| 1244 1247 |  | 
| 1245 | 
            -
                it  | 
| 1246 | 
            -
                  skip  | 
| 1248 | 
            +
                it 'has a working function #inout' do
         | 
| 1249 | 
            +
                  skip 'This function is defined in the header but not implemented'
         | 
| 1247 1250 | 
             
                end
         | 
| 1248 1251 |  | 
| 1249 | 
            -
                it  | 
| 1250 | 
            -
                  skip  | 
| 1252 | 
            +
                it 'has a working function #out' do
         | 
| 1253 | 
            +
                  skip 'This function is defined in the header but not implemented'
         | 
| 1251 1254 | 
             
                end
         | 
| 1252 1255 |  | 
| 1253 | 
            -
                it  | 
| 1256 | 
            +
                it 'has a working function #returnv' do
         | 
| 1254 1257 | 
             
                  u = GIMarshallingTests::Union.returnv
         | 
| 1255 1258 | 
             
                  assert_instance_of GIMarshallingTests::Union, u
         | 
| 1256 1259 | 
             
                end
         | 
| 1257 1260 | 
             
              end
         | 
| 1258 1261 |  | 
| 1259 | 
            -
              it  | 
| 1262 | 
            +
              it 'has a working function #array_enum_in' do
         | 
| 1260 1263 | 
             
                GIMarshallingTests.array_enum_in [:value1, :value2, :value3]
         | 
| 1261 1264 | 
             
              end
         | 
| 1262 1265 |  | 
| 1263 | 
            -
              it  | 
| 1266 | 
            +
              it 'has a working function #array_fixed_inout' do
         | 
| 1264 1267 | 
             
                res = GIMarshallingTests.array_fixed_inout [-1, 0, 1, 2]
         | 
| 1265 1268 | 
             
                res.must_be :==, [2, 1, 0, -1]
         | 
| 1266 1269 | 
             
              end
         | 
| 1267 1270 |  | 
| 1268 | 
            -
              it  | 
| 1271 | 
            +
              it 'has a working function #array_fixed_int_in' do
         | 
| 1269 1272 | 
             
                GIMarshallingTests.array_fixed_int_in [-1, 0, 1, 2]
         | 
| 1270 1273 | 
             
                pass
         | 
| 1271 1274 | 
             
              end
         | 
| 1272 1275 |  | 
| 1273 | 
            -
              it  | 
| 1276 | 
            +
              it 'has a working function #array_fixed_int_return' do
         | 
| 1274 1277 | 
             
                res = GIMarshallingTests.array_fixed_int_return
         | 
| 1275 1278 | 
             
                res.must_be :==, [-1, 0, 1, 2]
         | 
| 1276 1279 | 
             
              end
         | 
| 1277 1280 |  | 
| 1278 | 
            -
              it  | 
| 1281 | 
            +
              it 'has a working function #array_fixed_out' do
         | 
| 1279 1282 | 
             
                res = GIMarshallingTests.array_fixed_out
         | 
| 1280 1283 | 
             
                res.must_be :==, [-1, 0, 1, 2]
         | 
| 1281 1284 | 
             
              end
         | 
| 1282 1285 |  | 
| 1283 | 
            -
              it  | 
| 1286 | 
            +
              it 'has a working function #array_fixed_out_struct' do
         | 
| 1284 1287 | 
             
                res = GIMarshallingTests.array_fixed_out_struct
         | 
| 1285 | 
            -
                assert_equal [[7, 6], [6, 7]], res.map {|s| [s.long_, s.int8]}
         | 
| 1288 | 
            +
                assert_equal [[7, 6], [6, 7]], res.map { |s| [s.long_, s.int8] }
         | 
| 1286 1289 | 
             
              end
         | 
| 1287 1290 |  | 
| 1288 | 
            -
              it  | 
| 1291 | 
            +
              it 'has a working function #array_fixed_short_in' do
         | 
| 1289 1292 | 
             
                GIMarshallingTests.array_fixed_short_in [-1, 0, 1, 2]
         | 
| 1290 1293 | 
             
                pass
         | 
| 1291 1294 | 
             
              end
         | 
| 1292 1295 |  | 
| 1293 | 
            -
              it  | 
| 1296 | 
            +
              it 'has a working function #array_fixed_short_return' do
         | 
| 1294 1297 | 
             
                res = GIMarshallingTests.array_fixed_short_return
         | 
| 1295 1298 | 
             
                res.must_be :==, [-1, 0, 1, 2]
         | 
| 1296 1299 | 
             
              end
         | 
| 1297 1300 |  | 
| 1298 | 
            -
              it  | 
| 1301 | 
            +
              it 'has a working function #array_gvariant_container_in' do
         | 
| 1299 1302 | 
             
                v1 = GLib::Variant.new_int32(27)
         | 
| 1300 | 
            -
                v2 = GLib::Variant.new_string( | 
| 1303 | 
            +
                v2 = GLib::Variant.new_string('Hello')
         | 
| 1301 1304 | 
             
                result = GIMarshallingTests.array_gvariant_container_in [v1, v2]
         | 
| 1302 1305 | 
             
                arr = result.to_a
         | 
| 1303 1306 | 
             
                arr.size.must_equal 2
         | 
| 1304 1307 | 
             
                arr[0].get_int32.must_equal 27
         | 
| 1305 | 
            -
                arr[1].get_string.must_equal  | 
| 1308 | 
            +
                arr[1].get_string.must_equal 'Hello'
         | 
| 1306 1309 | 
             
              end
         | 
| 1307 1310 |  | 
| 1308 | 
            -
              it  | 
| 1311 | 
            +
              it 'has a working function #array_gvariant_full_in' do
         | 
| 1309 1312 | 
             
                v1 = GLib::Variant.new_int32(27)
         | 
| 1310 | 
            -
                v2 = GLib::Variant.new_string( | 
| 1313 | 
            +
                v2 = GLib::Variant.new_string('Hello')
         | 
| 1311 1314 | 
             
                result = GIMarshallingTests.array_gvariant_full_in [v1, v2]
         | 
| 1312 1315 | 
             
                arr = result.to_a
         | 
| 1313 1316 | 
             
                arr.size.must_equal 2
         | 
| 1314 1317 | 
             
                arr[0].get_int32.must_equal 27
         | 
| 1315 | 
            -
                arr[1].get_string.must_equal  | 
| 1318 | 
            +
                arr[1].get_string.must_equal 'Hello'
         | 
| 1316 1319 | 
             
              end
         | 
| 1317 1320 |  | 
| 1318 | 
            -
              it  | 
| 1321 | 
            +
              it 'has a working function #array_gvariant_none_in' do
         | 
| 1319 1322 | 
             
                v1 = GLib::Variant.new_int32(27)
         | 
| 1320 | 
            -
                v2 = GLib::Variant.new_string( | 
| 1323 | 
            +
                v2 = GLib::Variant.new_string('Hello')
         | 
| 1321 1324 | 
             
                result = GIMarshallingTests.array_gvariant_none_in [v1, v2]
         | 
| 1322 1325 | 
             
                arr = result.to_a
         | 
| 1323 1326 | 
             
                arr.size.must_equal 2
         | 
| 1324 1327 | 
             
                arr[0].get_int32.must_equal 27
         | 
| 1325 | 
            -
                arr[1].get_string.must_equal  | 
| 1328 | 
            +
                arr[1].get_string.must_equal 'Hello'
         | 
| 1326 1329 | 
             
              end
         | 
| 1327 1330 |  | 
| 1328 | 
            -
              it  | 
| 1331 | 
            +
              it 'has a working function #array_in' do
         | 
| 1329 1332 | 
             
                GIMarshallingTests.array_in [-1, 0, 1, 2]
         | 
| 1330 1333 | 
             
                pass
         | 
| 1331 1334 | 
             
              end
         | 
| 1332 1335 |  | 
| 1333 | 
            -
              it  | 
| 1336 | 
            +
              it 'has a working function #array_in_guint64_len' do
         | 
| 1334 1337 | 
             
                GIMarshallingTests.array_in_guint64_len [-1, 0, 1, 2]
         | 
| 1335 1338 | 
             
                pass
         | 
| 1336 1339 | 
             
              end
         | 
| 1337 1340 |  | 
| 1338 | 
            -
              it  | 
| 1341 | 
            +
              it 'has a working function #array_in_guint8_len' do
         | 
| 1339 1342 | 
             
                GIMarshallingTests.array_in_guint8_len [-1, 0, 1, 2]
         | 
| 1340 1343 | 
             
                pass
         | 
| 1341 1344 | 
             
              end
         | 
| 1342 1345 |  | 
| 1343 | 
            -
              it  | 
| 1346 | 
            +
              it 'has a working function #array_in_len_before' do
         | 
| 1344 1347 | 
             
                GIMarshallingTests.array_in_len_before [-1, 0, 1, 2]
         | 
| 1345 1348 | 
             
                pass
         | 
| 1346 1349 | 
             
              end
         | 
| 1347 1350 |  | 
| 1348 | 
            -
              it  | 
| 1351 | 
            +
              it 'has a working function #array_in_len_zero_terminated' do
         | 
| 1349 1352 | 
             
                GIMarshallingTests.array_in_len_zero_terminated [-1, 0, 1, 2]
         | 
| 1350 1353 | 
             
                pass
         | 
| 1351 1354 | 
             
              end
         | 
| 1352 1355 |  | 
| 1353 | 
            -
              it  | 
| 1356 | 
            +
              it 'has a working function #array_in_nonzero_nonlen' do
         | 
| 1354 1357 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'array_in_nonzero_nonlen'
         | 
| 1355 1358 | 
             
                GIMarshallingTests.array_in_nonzero_nonlen 1, 'abcd'.bytes.to_a
         | 
| 1356 1359 | 
             
                pass
         | 
| 1357 1360 | 
             
              end
         | 
| 1358 1361 |  | 
| 1359 | 
            -
              it  | 
| 1362 | 
            +
              it 'has a working function #array_in_utf8_two_in' do
         | 
| 1360 1363 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'array_in_utf8_two_in'
         | 
| 1361 | 
            -
                GIMarshallingTests.array_in_utf8_two_in [-1, 0, 1, 2],  | 
| 1364 | 
            +
                GIMarshallingTests.array_in_utf8_two_in [-1, 0, 1, 2], '1', '2'
         | 
| 1362 1365 | 
             
                pass
         | 
| 1363 1366 | 
             
              end
         | 
| 1364 1367 |  | 
| 1365 | 
            -
              it  | 
| 1368 | 
            +
              it 'has a working function #array_in_utf8_two_in_out_of_order' do
         | 
| 1366 1369 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'array_in_utf8_two_in_out_of_order'
         | 
| 1367 | 
            -
                GIMarshallingTests.array_in_utf8_two_in_out_of_order  | 
| 1370 | 
            +
                GIMarshallingTests.array_in_utf8_two_in_out_of_order '1', [-1, 0, 1, 2], '2'
         | 
| 1368 1371 | 
             
                pass
         | 
| 1369 1372 | 
             
              end
         | 
| 1370 1373 |  | 
| 1371 | 
            -
              it  | 
| 1374 | 
            +
              it 'has a working function #array_inout' do
         | 
| 1372 1375 | 
             
                res = GIMarshallingTests.array_inout [-1, 0, 1, 2]
         | 
| 1373 1376 | 
             
                res.must_be :==, [-2, -1, 0, 1, 2]
         | 
| 1374 1377 | 
             
              end
         | 
| 1375 1378 |  | 
| 1376 | 
            -
              it  | 
| 1379 | 
            +
              it 'has a working function #array_inout_etc' do
         | 
| 1377 1380 | 
             
                arr, sum = GIMarshallingTests.array_inout_etc 42, [-1, 0, 1, 2], 24
         | 
| 1378 1381 | 
             
                arr.must_be :==, [42, -1, 0, 1, 24]
         | 
| 1379 1382 | 
             
                sum.must_equal 42 + 24
         | 
| 1380 1383 | 
             
              end
         | 
| 1381 1384 |  | 
| 1382 | 
            -
              it  | 
| 1385 | 
            +
              it 'has a working function #array_out' do
         | 
| 1383 1386 | 
             
                res = GIMarshallingTests.array_out
         | 
| 1384 1387 | 
             
                res.must_be :==, [-1, 0, 1, 2]
         | 
| 1385 1388 | 
             
              end
         | 
| 1386 1389 |  | 
| 1387 | 
            -
              it  | 
| 1390 | 
            +
              it 'has a working function #array_out_etc' do
         | 
| 1388 1391 | 
             
                arr, sum = GIMarshallingTests.array_out_etc 42, 24
         | 
| 1389 1392 | 
             
                arr.must_be :==, [42, 0, 1, 24]
         | 
| 1390 1393 | 
             
                sum.must_equal 42 + 24
         | 
| 1391 1394 | 
             
              end
         | 
| 1392 1395 |  | 
| 1393 | 
            -
              it  | 
| 1396 | 
            +
              it 'has a working function #array_return' do
         | 
| 1394 1397 | 
             
                res = GIMarshallingTests.array_return
         | 
| 1395 1398 | 
             
                res.must_be :==, [-1, 0, 1, 2]
         | 
| 1396 1399 | 
             
              end
         | 
| 1397 1400 |  | 
| 1398 | 
            -
              it  | 
| 1401 | 
            +
              it 'has a working function #array_return_etc' do
         | 
| 1399 1402 | 
             
                arr, sum = GIMarshallingTests.array_return_etc 42, 24
         | 
| 1400 1403 | 
             
                arr.must_be :==, [42, 0, 1, 24]
         | 
| 1401 1404 | 
             
                sum.must_equal 42 + 24
         | 
| 1402 1405 | 
             
              end
         | 
| 1403 1406 |  | 
| 1404 | 
            -
              it  | 
| 1407 | 
            +
              it 'has a working function #array_simple_struct_in' do
         | 
| 1405 1408 | 
             
                arr = [1, 2, 3].map { |val|
         | 
| 1406 1409 | 
             
                  GIMarshallingTests::SimpleStruct.new.tap { |struct| struct.long_ = val }
         | 
| 1407 1410 | 
             
                }
         | 
| 1408 1411 | 
             
                GIMarshallingTests.array_simple_struct_in arr
         | 
| 1409 1412 | 
             
              end
         | 
| 1410 1413 |  | 
| 1411 | 
            -
              it  | 
| 1412 | 
            -
                GIMarshallingTests.array_string_in  | 
| 1414 | 
            +
              it 'has a working function #array_string_in' do
         | 
| 1415 | 
            +
                GIMarshallingTests.array_string_in %w(foo bar)
         | 
| 1413 1416 | 
             
                pass
         | 
| 1414 1417 | 
             
              end
         | 
| 1415 1418 |  | 
| 1416 | 
            -
              it  | 
| 1419 | 
            +
              it 'has a working function #array_struct_in' do
         | 
| 1417 1420 | 
             
                arr = [1, 2, 3].map { |val|
         | 
| 1418 1421 | 
             
                  GIMarshallingTests::BoxedStruct.new.tap { |struct| struct.long_ = val }
         | 
| 1419 1422 | 
             
                }
         | 
| @@ -1421,14 +1424,14 @@ describe GIMarshallingTests do | |
| 1421 1424 | 
             
              end
         | 
| 1422 1425 |  | 
| 1423 1426 | 
             
              # NOTE: Should be run with valgrind. See gimarhallingtests.c.
         | 
| 1424 | 
            -
              it  | 
| 1427 | 
            +
              it 'has a working function #array_struct_take_in' do
         | 
| 1425 1428 | 
             
                arr = [1, 2, 3].map { |val|
         | 
| 1426 1429 | 
             
                  GIMarshallingTests::BoxedStruct.new.tap { |struct| struct.long_ = val }
         | 
| 1427 1430 | 
             
                }
         | 
| 1428 1431 | 
             
                GIMarshallingTests.array_struct_take_in arr
         | 
| 1429 1432 | 
             
              end
         | 
| 1430 1433 |  | 
| 1431 | 
            -
              it  | 
| 1434 | 
            +
              it 'has a working function #array_struct_value_in' do
         | 
| 1432 1435 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'array_struct_value_in'
         | 
| 1433 1436 | 
             
                arr = [1, 2, 3].map { |val|
         | 
| 1434 1437 | 
             
                  GIMarshallingTests::BoxedStruct.new.tap { |struct| struct.long_ = val }
         | 
| @@ -1436,109 +1439,109 @@ describe GIMarshallingTests do | |
| 1436 1439 | 
             
                GIMarshallingTests.array_struct_value_in arr
         | 
| 1437 1440 | 
             
              end
         | 
| 1438 1441 |  | 
| 1439 | 
            -
              it  | 
| 1440 | 
            -
                arr =  | 
| 1442 | 
            +
              it 'has a working function #array_uint8_in' do
         | 
| 1443 | 
            +
                arr = 'abcd'.bytes.to_a
         | 
| 1441 1444 | 
             
                GIMarshallingTests.array_uint8_in arr
         | 
| 1442 1445 | 
             
                pass
         | 
| 1443 1446 | 
             
              end
         | 
| 1444 1447 |  | 
| 1445 | 
            -
              it  | 
| 1446 | 
            -
                GIMarshallingTests.array_zero_terminated_in  | 
| 1448 | 
            +
              it 'has a working function #array_zero_terminated_in' do
         | 
| 1449 | 
            +
                GIMarshallingTests.array_zero_terminated_in %w(0 1 2)
         | 
| 1447 1450 | 
             
                pass
         | 
| 1448 1451 | 
             
              end
         | 
| 1449 1452 |  | 
| 1450 | 
            -
              it  | 
| 1451 | 
            -
                res = GIMarshallingTests.array_zero_terminated_inout  | 
| 1452 | 
            -
                res.must_be :==, [ | 
| 1453 | 
            +
              it 'has a working function #array_zero_terminated_inout' do
         | 
| 1454 | 
            +
                res = GIMarshallingTests.array_zero_terminated_inout %w(0 1 2)
         | 
| 1455 | 
            +
                res.must_be :==, ['-1', '0', '1', '2']
         | 
| 1453 1456 | 
             
              end
         | 
| 1454 1457 |  | 
| 1455 | 
            -
              it  | 
| 1458 | 
            +
              it 'has a working function #array_zero_terminated_out' do
         | 
| 1456 1459 | 
             
                res = GIMarshallingTests.array_zero_terminated_out
         | 
| 1457 | 
            -
                res.must_be :==,  | 
| 1460 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1458 1461 | 
             
              end
         | 
| 1459 1462 |  | 
| 1460 | 
            -
              it  | 
| 1463 | 
            +
              it 'has a working function #array_zero_terminated_return' do
         | 
| 1461 1464 | 
             
                res = GIMarshallingTests.array_zero_terminated_return
         | 
| 1462 | 
            -
                res.must_be :==,  | 
| 1465 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1463 1466 | 
             
              end
         | 
| 1464 1467 |  | 
| 1465 | 
            -
              it  | 
| 1468 | 
            +
              it 'has a working function #array_zero_terminated_return_null' do
         | 
| 1466 1469 | 
             
                res = GIMarshallingTests.array_zero_terminated_return_null
         | 
| 1467 1470 | 
             
                res.must_be :==, []
         | 
| 1468 1471 | 
             
              end
         | 
| 1469 1472 |  | 
| 1470 | 
            -
              it  | 
| 1473 | 
            +
              it 'has a working function #array_zero_terminated_return_struct' do
         | 
| 1471 1474 | 
             
                res = GIMarshallingTests.array_zero_terminated_return_struct
         | 
| 1472 1475 | 
             
                res.to_a.map(&:long_).must_equal [42, 43, 44]
         | 
| 1473 1476 | 
             
              end
         | 
| 1474 1477 |  | 
| 1475 | 
            -
              it  | 
| 1478 | 
            +
              it 'has a working function #boolean_in_false' do
         | 
| 1476 1479 | 
             
                GIMarshallingTests.boolean_in_false false
         | 
| 1477 1480 | 
             
                pass
         | 
| 1478 1481 | 
             
              end
         | 
| 1479 1482 |  | 
| 1480 | 
            -
              it  | 
| 1483 | 
            +
              it 'has a working function #boolean_in_true' do
         | 
| 1481 1484 | 
             
                GIMarshallingTests.boolean_in_true true
         | 
| 1482 1485 | 
             
                pass
         | 
| 1483 1486 | 
             
              end
         | 
| 1484 1487 |  | 
| 1485 | 
            -
              it  | 
| 1488 | 
            +
              it 'has a working function #boolean_inout_false_true' do
         | 
| 1486 1489 | 
             
                res = GIMarshallingTests.boolean_inout_false_true false
         | 
| 1487 1490 | 
             
                assert_equal true, res
         | 
| 1488 1491 | 
             
              end
         | 
| 1489 1492 |  | 
| 1490 | 
            -
              it  | 
| 1493 | 
            +
              it 'has a working function #boolean_inout_true_false' do
         | 
| 1491 1494 | 
             
                res = GIMarshallingTests.boolean_inout_true_false true
         | 
| 1492 1495 | 
             
                assert_equal false, res
         | 
| 1493 1496 | 
             
              end
         | 
| 1494 1497 |  | 
| 1495 | 
            -
              it  | 
| 1498 | 
            +
              it 'has a working function #boolean_out_false' do
         | 
| 1496 1499 | 
             
                res = GIMarshallingTests.boolean_out_false
         | 
| 1497 1500 | 
             
                assert_equal false, res
         | 
| 1498 1501 | 
             
              end
         | 
| 1499 1502 |  | 
| 1500 | 
            -
              it  | 
| 1503 | 
            +
              it 'has a working function #boolean_out_true' do
         | 
| 1501 1504 | 
             
                res = GIMarshallingTests.boolean_out_true
         | 
| 1502 1505 | 
             
                assert_equal true, res
         | 
| 1503 1506 | 
             
              end
         | 
| 1504 1507 |  | 
| 1505 | 
            -
              it  | 
| 1508 | 
            +
              it 'has a working function #boolean_return_false' do
         | 
| 1506 1509 | 
             
                res = GIMarshallingTests.boolean_return_false
         | 
| 1507 1510 | 
             
                assert_equal false, res
         | 
| 1508 1511 | 
             
              end
         | 
| 1509 1512 |  | 
| 1510 | 
            -
              it  | 
| 1513 | 
            +
              it 'has a working function #boolean_return_true' do
         | 
| 1511 1514 | 
             
                res = GIMarshallingTests.boolean_return_true
         | 
| 1512 1515 | 
             
                assert_equal true, res
         | 
| 1513 1516 | 
             
              end
         | 
| 1514 1517 |  | 
| 1515 | 
            -
              it  | 
| 1518 | 
            +
              it 'has a working function #boxed_struct_inout' do
         | 
| 1516 1519 | 
             
                bx = GIMarshallingTests::BoxedStruct.new
         | 
| 1517 1520 | 
             
                bx.long_ = 42
         | 
| 1518 1521 | 
             
                res = GIMarshallingTests.boxed_struct_inout bx
         | 
| 1519 1522 | 
             
                assert_equal 0, res.long_
         | 
| 1520 1523 | 
             
              end
         | 
| 1521 1524 |  | 
| 1522 | 
            -
              it  | 
| 1525 | 
            +
              it 'has a working function #boxed_struct_out' do
         | 
| 1523 1526 | 
             
                res = GIMarshallingTests.boxed_struct_out
         | 
| 1524 1527 | 
             
                assert_equal 42, res.long_
         | 
| 1525 1528 | 
             
              end
         | 
| 1526 1529 |  | 
| 1527 | 
            -
              it  | 
| 1530 | 
            +
              it 'has a working function #boxed_struct_returnv' do
         | 
| 1528 1531 | 
             
                res = GIMarshallingTests.boxed_struct_returnv
         | 
| 1529 1532 | 
             
                assert_equal 42, res.long_
         | 
| 1530 | 
            -
                res.g_strv.must_be :==,  | 
| 1533 | 
            +
                res.g_strv.must_be :==, %w(0 1 2)
         | 
| 1531 1534 | 
             
              end
         | 
| 1532 1535 |  | 
| 1533 | 
            -
              it  | 
| 1536 | 
            +
              it 'has a working function #bytearray_full_return' do
         | 
| 1534 1537 | 
             
                ret = GIMarshallingTests.bytearray_full_return
         | 
| 1535 1538 | 
             
                assert_instance_of GLib::ByteArray, ret
         | 
| 1536 1539 | 
             
                assert_includes(
         | 
| 1537 | 
            -
                  [ | 
| 1540 | 
            +
                  ['0123'.bytes.to_a, "\x001\xFF3".bytes.to_a],
         | 
| 1538 1541 | 
             
                  ret.to_string.bytes.to_a)
         | 
| 1539 1542 | 
             
              end
         | 
| 1540 1543 |  | 
| 1541 | 
            -
              it  | 
| 1544 | 
            +
              it 'has a working function #bytearray_none_in' do
         | 
| 1542 1545 | 
             
                val = GIMarshallingTests.bytearray_full_return.to_string
         | 
| 1543 1546 | 
             
                ba = GLib::ByteArray.new
         | 
| 1544 1547 | 
             
                ba = ba.append val
         | 
| @@ -1546,19 +1549,19 @@ describe GIMarshallingTests do | |
| 1546 1549 | 
             
                pass
         | 
| 1547 1550 | 
             
              end
         | 
| 1548 1551 |  | 
| 1549 | 
            -
              it  | 
| 1550 | 
            -
                result = GIMarshallingTests.callback_multiple_out_parameters proc { |* | 
| 1552 | 
            +
              it 'has a working function #callback_multiple_out_parameters' do
         | 
| 1553 | 
            +
                result = GIMarshallingTests.callback_multiple_out_parameters proc { |*_args|
         | 
| 1551 1554 | 
             
                  [12.0, 13.0]
         | 
| 1552 1555 | 
             
                }
         | 
| 1553 1556 | 
             
                result.must_equal [12.0, 13.0]
         | 
| 1554 1557 | 
             
              end
         | 
| 1555 1558 |  | 
| 1556 | 
            -
              it  | 
| 1559 | 
            +
              it 'has a working function #callback_one_out_parameter' do
         | 
| 1557 1560 | 
             
                result = GIMarshallingTests.callback_one_out_parameter proc { 42.0 }
         | 
| 1558 1561 | 
             
                result.must_equal 42.0
         | 
| 1559 1562 | 
             
              end
         | 
| 1560 1563 |  | 
| 1561 | 
            -
              it  | 
| 1564 | 
            +
              it 'has a working function #callback_owned_boxed' do
         | 
| 1562 1565 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'callback_owned_boxed'
         | 
| 1563 1566 | 
             
                a = nil
         | 
| 1564 1567 |  | 
| @@ -1573,251 +1576,251 @@ describe GIMarshallingTests do | |
| 1573 1576 | 
             
                a.must_equal 44
         | 
| 1574 1577 | 
             
              end
         | 
| 1575 1578 |  | 
| 1576 | 
            -
              it  | 
| 1577 | 
            -
                result = GIMarshallingTests.callback_return_value_and_multiple_out_parameters proc { |* | 
| 1579 | 
            +
              it 'has a working function #callback_return_value_and_multiple_out_parameters' do
         | 
| 1580 | 
            +
                result = GIMarshallingTests.callback_return_value_and_multiple_out_parameters proc { |*_args|
         | 
| 1578 1581 | 
             
                  [42, -142, 3]
         | 
| 1579 1582 | 
             
                }
         | 
| 1580 1583 | 
             
                result.must_equal [42, -142, 3]
         | 
| 1581 1584 | 
             
              end
         | 
| 1582 1585 |  | 
| 1583 | 
            -
              it  | 
| 1584 | 
            -
                result = GIMarshallingTests.callback_return_value_and_one_out_parameter proc { |* | 
| 1586 | 
            +
              it 'has a working function #callback_return_value_and_one_out_parameter' do
         | 
| 1587 | 
            +
                result = GIMarshallingTests.callback_return_value_and_one_out_parameter proc { |*_args|
         | 
| 1585 1588 | 
             
                  [42, -142]
         | 
| 1586 1589 | 
             
                }
         | 
| 1587 1590 | 
             
                result.must_equal [42, -142]
         | 
| 1588 1591 | 
             
              end
         | 
| 1589 1592 |  | 
| 1590 | 
            -
              it  | 
| 1593 | 
            +
              it 'has a working function #callback_return_value_only' do
         | 
| 1591 1594 | 
             
                result = GIMarshallingTests.callback_return_value_only proc { 42 }
         | 
| 1592 1595 | 
             
                result.must_equal 42
         | 
| 1593 1596 | 
             
              end
         | 
| 1594 1597 |  | 
| 1595 | 
            -
              it  | 
| 1598 | 
            +
              it 'has a working function #double_in' do
         | 
| 1596 1599 | 
             
                GIMarshallingTests.double_in Float::MAX
         | 
| 1597 1600 | 
             
                pass
         | 
| 1598 1601 | 
             
              end
         | 
| 1599 1602 |  | 
| 1600 | 
            -
              it  | 
| 1603 | 
            +
              it 'has a working function #double_inout' do
         | 
| 1601 1604 | 
             
                ret = GIMarshallingTests.double_inout Float::MAX
         | 
| 1602 1605 | 
             
                assert_in_epsilon 2.225e-308, ret
         | 
| 1603 1606 | 
             
              end
         | 
| 1604 1607 |  | 
| 1605 | 
            -
              it  | 
| 1608 | 
            +
              it 'has a working function #double_out' do
         | 
| 1606 1609 | 
             
                ret = GIMarshallingTests.double_out
         | 
| 1607 1610 | 
             
                assert_equal Float::MAX, ret
         | 
| 1608 1611 | 
             
              end
         | 
| 1609 1612 |  | 
| 1610 | 
            -
              it  | 
| 1613 | 
            +
              it 'has a working function #double_return' do
         | 
| 1611 1614 | 
             
                ret = GIMarshallingTests.double_return
         | 
| 1612 1615 | 
             
                assert_equal Float::MAX, ret
         | 
| 1613 1616 | 
             
              end
         | 
| 1614 1617 |  | 
| 1615 | 
            -
              it  | 
| 1618 | 
            +
              it 'has a working function #enum_in' do
         | 
| 1616 1619 | 
             
                GIMarshallingTests.enum_in :value3
         | 
| 1617 1620 | 
             
                pass
         | 
| 1618 1621 | 
             
              end
         | 
| 1619 1622 |  | 
| 1620 | 
            -
              it  | 
| 1623 | 
            +
              it 'has a working function #enum_inout' do
         | 
| 1621 1624 | 
             
                e = GIMarshallingTests.enum_inout :value3
         | 
| 1622 1625 | 
             
                assert_equal :value1, e
         | 
| 1623 1626 | 
             
              end
         | 
| 1624 1627 |  | 
| 1625 | 
            -
              it  | 
| 1628 | 
            +
              it 'has a working function #enum_out' do
         | 
| 1626 1629 | 
             
                e = GIMarshallingTests.enum_out
         | 
| 1627 1630 | 
             
                assert_equal :value3, e
         | 
| 1628 1631 | 
             
              end
         | 
| 1629 1632 |  | 
| 1630 | 
            -
              it  | 
| 1633 | 
            +
              it 'has a working function #enum_returnv' do
         | 
| 1631 1634 | 
             
                e = GIMarshallingTests.enum_returnv
         | 
| 1632 1635 | 
             
                assert_equal :value3, e
         | 
| 1633 1636 | 
             
              end
         | 
| 1634 1637 |  | 
| 1635 | 
            -
              it  | 
| 1638 | 
            +
              it 'has a working function #filename_list_return' do
         | 
| 1636 1639 | 
             
                fl = GIMarshallingTests.filename_list_return
         | 
| 1637 1640 | 
             
                assert_equal nil, fl
         | 
| 1638 1641 | 
             
              end
         | 
| 1639 1642 |  | 
| 1640 | 
            -
              it  | 
| 1643 | 
            +
              it 'has a working function #flags_in' do
         | 
| 1641 1644 | 
             
                GIMarshallingTests.flags_in :value2
         | 
| 1642 1645 | 
             
                pass
         | 
| 1643 1646 | 
             
              end
         | 
| 1644 1647 |  | 
| 1645 | 
            -
              it  | 
| 1648 | 
            +
              it 'has a working function #flags_in_zero' do
         | 
| 1646 1649 | 
             
                GIMarshallingTests.flags_in_zero 0
         | 
| 1647 1650 | 
             
                pass
         | 
| 1648 1651 | 
             
              end
         | 
| 1649 1652 |  | 
| 1650 | 
            -
              it  | 
| 1653 | 
            +
              it 'has a working function #flags_inout' do
         | 
| 1651 1654 | 
             
                res = GIMarshallingTests.flags_inout :value2
         | 
| 1652 1655 | 
             
                assert_equal :value1, res
         | 
| 1653 1656 | 
             
              end
         | 
| 1654 1657 |  | 
| 1655 | 
            -
              it  | 
| 1658 | 
            +
              it 'has a working function #flags_out' do
         | 
| 1656 1659 | 
             
                res = GIMarshallingTests.flags_out
         | 
| 1657 1660 | 
             
                assert_equal :value2, res
         | 
| 1658 1661 | 
             
              end
         | 
| 1659 1662 |  | 
| 1660 | 
            -
              it  | 
| 1663 | 
            +
              it 'has a working function #flags_returnv' do
         | 
| 1661 1664 | 
             
                res = GIMarshallingTests.flags_returnv
         | 
| 1662 1665 | 
             
                assert_equal :value2, res
         | 
| 1663 1666 | 
             
              end
         | 
| 1664 1667 |  | 
| 1665 | 
            -
              it  | 
| 1668 | 
            +
              it 'has a working function #float_in' do
         | 
| 1666 1669 | 
             
                # float_return returns MAX_FLT
         | 
| 1667 1670 | 
             
                flt = GIMarshallingTests.float_return
         | 
| 1668 1671 | 
             
                GIMarshallingTests.float_in flt
         | 
| 1669 1672 | 
             
                pass
         | 
| 1670 1673 | 
             
              end
         | 
| 1671 1674 |  | 
| 1672 | 
            -
              it  | 
| 1675 | 
            +
              it 'has a working function #float_inout' do
         | 
| 1673 1676 | 
             
                # float_return returns MAX_FLT
         | 
| 1674 1677 | 
             
                flt = GIMarshallingTests.float_return
         | 
| 1675 1678 | 
             
                res = GIMarshallingTests.float_inout flt
         | 
| 1676 1679 | 
             
                assert_in_epsilon 1.175e-38, res
         | 
| 1677 1680 | 
             
              end
         | 
| 1678 1681 |  | 
| 1679 | 
            -
              it  | 
| 1682 | 
            +
              it 'has a working function #float_out' do
         | 
| 1680 1683 | 
             
                flt = GIMarshallingTests.float_out
         | 
| 1681 1684 | 
             
                assert_in_epsilon 3.402e+38, flt
         | 
| 1682 1685 | 
             
              end
         | 
| 1683 1686 |  | 
| 1684 | 
            -
              it  | 
| 1687 | 
            +
              it 'has a working function #float_return' do
         | 
| 1685 1688 | 
             
                flt = GIMarshallingTests.float_return
         | 
| 1686 1689 | 
             
                assert_in_epsilon 3.402e+38, flt
         | 
| 1687 1690 | 
             
              end
         | 
| 1688 1691 |  | 
| 1689 | 
            -
              it  | 
| 1692 | 
            +
              it 'has a working function #garray_int_none_in' do
         | 
| 1690 1693 | 
             
                arr = [-1, 0, 1, 2]
         | 
| 1691 1694 | 
             
                GIMarshallingTests.garray_int_none_in arr
         | 
| 1692 1695 | 
             
                pass
         | 
| 1693 1696 | 
             
              end
         | 
| 1694 1697 |  | 
| 1695 | 
            -
              it  | 
| 1698 | 
            +
              it 'has a working function #garray_int_none_return' do
         | 
| 1696 1699 | 
             
                arr = GIMarshallingTests.garray_int_none_return
         | 
| 1697 1700 | 
             
                arr.must_be :==, [-1, 0, 1, 2]
         | 
| 1698 1701 | 
             
              end
         | 
| 1699 1702 |  | 
| 1700 | 
            -
              it  | 
| 1703 | 
            +
              it 'has a working function #garray_uint64_none_in' do
         | 
| 1701 1704 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'garray_uint64_none_in'
         | 
| 1702 1705 | 
             
                GIMarshallingTests.garray_uint64_none_in [0, 0xffff_ffff_ffff_ffff]
         | 
| 1703 1706 | 
             
                pass
         | 
| 1704 1707 | 
             
              end
         | 
| 1705 1708 |  | 
| 1706 | 
            -
              it  | 
| 1709 | 
            +
              it 'has a working function #garray_uint64_none_return' do
         | 
| 1707 1710 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'garray_uint64_none_return'
         | 
| 1708 1711 | 
             
                res = GIMarshallingTests.garray_uint64_none_return
         | 
| 1709 1712 | 
             
                res.must_be :==, [0, 0xffff_ffff_ffff_ffff]
         | 
| 1710 1713 | 
             
              end
         | 
| 1711 1714 |  | 
| 1712 | 
            -
              it  | 
| 1713 | 
            -
                res = GIMarshallingTests.garray_utf8_container_inout  | 
| 1714 | 
            -
                res.must_be :==, [ | 
| 1715 | 
            +
              it 'has a working function #garray_utf8_container_inout' do
         | 
| 1716 | 
            +
                res = GIMarshallingTests.garray_utf8_container_inout %w(0 1 2)
         | 
| 1717 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 1715 1718 | 
             
              end
         | 
| 1716 1719 |  | 
| 1717 | 
            -
              it  | 
| 1720 | 
            +
              it 'has a working function #garray_utf8_container_out' do
         | 
| 1718 1721 | 
             
                res = GIMarshallingTests.garray_utf8_container_out
         | 
| 1719 | 
            -
                res.must_be :==,  | 
| 1722 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1720 1723 | 
             
              end
         | 
| 1721 1724 |  | 
| 1722 | 
            -
              it  | 
| 1725 | 
            +
              it 'has a working function #garray_utf8_container_return' do
         | 
| 1723 1726 | 
             
                res = GIMarshallingTests.garray_utf8_container_return
         | 
| 1724 | 
            -
                res.must_be :==,  | 
| 1727 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1725 1728 | 
             
              end
         | 
| 1726 1729 |  | 
| 1727 | 
            -
              it  | 
| 1728 | 
            -
                arr =  | 
| 1730 | 
            +
              it 'has a working function #garray_utf8_full_inout' do
         | 
| 1731 | 
            +
                arr = %w(0 1 2)
         | 
| 1729 1732 | 
             
                res = GIMarshallingTests.garray_utf8_full_inout arr
         | 
| 1730 | 
            -
                res.must_be :==, [ | 
| 1733 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 1731 1734 | 
             
              end
         | 
| 1732 1735 |  | 
| 1733 | 
            -
              it  | 
| 1736 | 
            +
              it 'has a working function #garray_utf8_full_out' do
         | 
| 1734 1737 | 
             
                res = GIMarshallingTests.garray_utf8_full_out
         | 
| 1735 | 
            -
                res.must_be :==,  | 
| 1738 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1736 1739 | 
             
              end
         | 
| 1737 1740 |  | 
| 1738 | 
            -
              it  | 
| 1741 | 
            +
              it 'has a working function #garray_utf8_full_out_caller_allocated' do
         | 
| 1739 1742 | 
             
                skip unless get_introspection_data 'GIMarshallingTests',
         | 
| 1740 1743 | 
             
                  'garray_utf8_full_out_caller_allocated'
         | 
| 1741 1744 | 
             
                res = GIMarshallingTests.garray_utf8_full_out_caller_allocated
         | 
| 1742 | 
            -
                res.must_be :==,  | 
| 1745 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1743 1746 | 
             
              end
         | 
| 1744 1747 |  | 
| 1745 | 
            -
              it  | 
| 1748 | 
            +
              it 'has a working function #garray_utf8_full_return' do
         | 
| 1746 1749 | 
             
                res = GIMarshallingTests.garray_utf8_full_return
         | 
| 1747 | 
            -
                res.must_be :==,  | 
| 1750 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1748 1751 | 
             
              end
         | 
| 1749 1752 |  | 
| 1750 | 
            -
              it  | 
| 1751 | 
            -
                arr =  | 
| 1753 | 
            +
              it 'has a working function #garray_utf8_none_in' do
         | 
| 1754 | 
            +
                arr = %w(0 1 2)
         | 
| 1752 1755 | 
             
                GIMarshallingTests.garray_utf8_none_in arr
         | 
| 1753 1756 | 
             
                pass
         | 
| 1754 1757 | 
             
              end
         | 
| 1755 1758 |  | 
| 1756 | 
            -
              it  | 
| 1757 | 
            -
                arr =  | 
| 1759 | 
            +
              it 'has a working function #garray_utf8_none_inout' do
         | 
| 1760 | 
            +
                arr = %w(0 1 2)
         | 
| 1758 1761 | 
             
                res = GIMarshallingTests.garray_utf8_none_inout arr
         | 
| 1759 | 
            -
                res.must_be :==, [ | 
| 1762 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 1760 1763 | 
             
              end
         | 
| 1761 1764 |  | 
| 1762 | 
            -
              it  | 
| 1765 | 
            +
              it 'has a working function #garray_utf8_none_out' do
         | 
| 1763 1766 | 
             
                res = GIMarshallingTests.garray_utf8_none_out
         | 
| 1764 | 
            -
                res.must_be :==,  | 
| 1767 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1765 1768 | 
             
              end
         | 
| 1766 1769 |  | 
| 1767 | 
            -
              it  | 
| 1770 | 
            +
              it 'has a working function #garray_utf8_none_return' do
         | 
| 1768 1771 | 
             
                res = GIMarshallingTests.garray_utf8_none_return
         | 
| 1769 | 
            -
                res.must_be :==,  | 
| 1772 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1770 1773 | 
             
              end
         | 
| 1771 1774 |  | 
| 1772 | 
            -
              it  | 
| 1775 | 
            +
              it 'has a working function #gbytes_full_return' do
         | 
| 1773 1776 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'gbytes_full_return'
         | 
| 1774 1777 | 
             
                res = GIMarshallingTests.gbytes_full_return
         | 
| 1775 1778 | 
             
                res.to_a.must_equal [0, 49, 0xFF, 51]
         | 
| 1776 1779 | 
             
              end
         | 
| 1777 1780 |  | 
| 1778 | 
            -
              it  | 
| 1781 | 
            +
              it 'has a working function #gbytes_none_in' do
         | 
| 1779 1782 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'gbytes_none_in'
         | 
| 1780 1783 | 
             
                GIMarshallingTests.gbytes_none_in [0, 49, 0xFF, 51]
         | 
| 1781 1784 | 
             
                pass
         | 
| 1782 1785 | 
             
              end
         | 
| 1783 1786 |  | 
| 1784 | 
            -
              it  | 
| 1787 | 
            +
              it 'has a working function #gclosure_in' do
         | 
| 1785 1788 | 
             
                cl = GObject::RubyClosure.new { 42 }
         | 
| 1786 1789 | 
             
                GIMarshallingTests.gclosure_in cl
         | 
| 1787 1790 | 
             
                pass
         | 
| 1788 1791 | 
             
              end
         | 
| 1789 1792 |  | 
| 1790 | 
            -
              it  | 
| 1793 | 
            +
              it 'has a working function #gclosure_return' do
         | 
| 1791 1794 | 
             
                cl = GIMarshallingTests.gclosure_return
         | 
| 1792 1795 | 
             
                gv = GObject::Value.wrap_ruby_value 0
         | 
| 1793 1796 | 
             
                cl.invoke gv, nil, nil
         | 
| 1794 1797 | 
             
                assert_equal 42, gv.get_value
         | 
| 1795 1798 | 
             
              end
         | 
| 1796 1799 |  | 
| 1797 | 
            -
              it  | 
| 1800 | 
            +
              it 'has a working function #genum_in' do
         | 
| 1798 1801 | 
             
                GIMarshallingTests.genum_in :value3
         | 
| 1799 1802 | 
             
                pass
         | 
| 1800 1803 | 
             
              end
         | 
| 1801 1804 |  | 
| 1802 | 
            -
              it  | 
| 1805 | 
            +
              it 'has a working function #genum_inout' do
         | 
| 1803 1806 | 
             
                res = GIMarshallingTests.genum_inout :value3
         | 
| 1804 1807 | 
             
                assert_equal :value1, res
         | 
| 1805 1808 | 
             
              end
         | 
| 1806 1809 |  | 
| 1807 | 
            -
              it  | 
| 1810 | 
            +
              it 'has a working function #genum_out' do
         | 
| 1808 1811 | 
             
                res = GIMarshallingTests.genum_out
         | 
| 1809 1812 | 
             
                assert_equal :value3, res
         | 
| 1810 1813 | 
             
              end
         | 
| 1811 1814 |  | 
| 1812 | 
            -
              it  | 
| 1815 | 
            +
              it 'has a working function #genum_returnv' do
         | 
| 1813 1816 | 
             
                res = GIMarshallingTests.genum_returnv
         | 
| 1814 1817 | 
             
                assert_equal :value3, res
         | 
| 1815 1818 | 
             
              end
         | 
| 1816 1819 |  | 
| 1817 | 
            -
              it  | 
| 1820 | 
            +
              it 'has a working function #gerror' do
         | 
| 1818 1821 | 
             
                begin
         | 
| 1819 1822 | 
             
                  GIMarshallingTests.gerror
         | 
| 1820 | 
            -
                  flunk  | 
| 1823 | 
            +
                  flunk 'Error should have been raised'
         | 
| 1821 1824 | 
             
                rescue GirFFI::GLibError => e
         | 
| 1822 1825 | 
             
                  e.message.must_equal GIMarshallingTests::CONSTANT_GERROR_MESSAGE
         | 
| 1823 1826 | 
             
                  e.domain.must_equal GIMarshallingTests::CONSTANT_GERROR_DOMAIN
         | 
| @@ -1825,10 +1828,10 @@ describe GIMarshallingTests do | |
| 1825 1828 | 
             
                end
         | 
| 1826 1829 | 
             
              end
         | 
| 1827 1830 |  | 
| 1828 | 
            -
              it  | 
| 1831 | 
            +
              it 'has a working function #gerror_array_in' do
         | 
| 1829 1832 | 
             
                begin
         | 
| 1830 1833 | 
             
                  GIMarshallingTests.gerror_array_in [1, 2, 3]
         | 
| 1831 | 
            -
                  flunk  | 
| 1834 | 
            +
                  flunk 'Error should have been raised'
         | 
| 1832 1835 | 
             
                rescue GirFFI::GLibError => e
         | 
| 1833 1836 | 
             
                  e.message.must_equal GIMarshallingTests::CONSTANT_GERROR_MESSAGE
         | 
| 1834 1837 | 
             
                  e.domain.must_equal GIMarshallingTests::CONSTANT_GERROR_DOMAIN
         | 
| @@ -1836,356 +1839,356 @@ describe GIMarshallingTests do | |
| 1836 1839 | 
             
                end
         | 
| 1837 1840 | 
             
              end
         | 
| 1838 1841 |  | 
| 1839 | 
            -
              it  | 
| 1842 | 
            +
              it 'has a working function #gerror_out' do
         | 
| 1840 1843 | 
             
                error, debug = GIMarshallingTests.gerror_out
         | 
| 1841 1844 | 
             
                debug.must_equal GIMarshallingTests::CONSTANT_GERROR_DEBUG_MESSAGE
         | 
| 1842 1845 | 
             
                error.message.must_equal GIMarshallingTests::CONSTANT_GERROR_MESSAGE
         | 
| 1843 1846 | 
             
              end
         | 
| 1844 1847 |  | 
| 1845 | 
            -
              it  | 
| 1848 | 
            +
              it 'has a working function #gerror_out_transfer_none' do
         | 
| 1846 1849 | 
             
                error, debug = GIMarshallingTests.gerror_out_transfer_none
         | 
| 1847 1850 | 
             
                debug.must_equal GIMarshallingTests::CONSTANT_GERROR_DEBUG_MESSAGE
         | 
| 1848 1851 | 
             
                error.message.must_equal GIMarshallingTests::CONSTANT_GERROR_MESSAGE
         | 
| 1849 1852 | 
             
              end
         | 
| 1850 1853 |  | 
| 1851 | 
            -
              it  | 
| 1854 | 
            +
              it 'has a working function #gerror_return' do
         | 
| 1852 1855 | 
             
                error = GIMarshallingTests.gerror_return
         | 
| 1853 1856 | 
             
                error.message.must_equal GIMarshallingTests::CONSTANT_GERROR_MESSAGE
         | 
| 1854 1857 | 
             
              end
         | 
| 1855 1858 |  | 
| 1856 | 
            -
              it  | 
| 1859 | 
            +
              it 'has a working function #ghashtable_int_none_in' do
         | 
| 1857 1860 | 
             
                GIMarshallingTests.ghashtable_int_none_in(
         | 
| 1858 | 
            -
                   | 
| 1861 | 
            +
                  -1 => 1, 0 => 0, 1 => -1, 2 => -2)
         | 
| 1859 1862 | 
             
              end
         | 
| 1860 1863 |  | 
| 1861 | 
            -
              it  | 
| 1864 | 
            +
              it 'has a working function #ghashtable_int_none_return' do
         | 
| 1862 1865 | 
             
                gh = GIMarshallingTests.ghashtable_int_none_return
         | 
| 1863 | 
            -
                assert_equal({-1 => 1, 0 => 0, 1 => -1, 2 => -2}, gh.to_hash)
         | 
| 1866 | 
            +
                assert_equal({ -1 => 1, 0 => 0, 1 => -1, 2 => -2 }, gh.to_hash)
         | 
| 1864 1867 | 
             
              end
         | 
| 1865 1868 |  | 
| 1866 | 
            -
              it  | 
| 1867 | 
            -
                skip  | 
| 1869 | 
            +
              it 'has a working function #ghashtable_utf8_container_in' do
         | 
| 1870 | 
            +
                skip 'This function is defined in the header but not implemented'
         | 
| 1868 1871 | 
             
              end
         | 
| 1869 1872 |  | 
| 1870 | 
            -
              it  | 
| 1871 | 
            -
                hsh = { | 
| 1873 | 
            +
              it 'has a working function #ghashtable_utf8_container_inout' do
         | 
| 1874 | 
            +
                hsh = { '-1' => '1', '0' => '0', '1' => '-1', '2' => '-2' }
         | 
| 1872 1875 | 
             
                res = GIMarshallingTests.ghashtable_utf8_container_inout hsh
         | 
| 1873 | 
            -
                assert_equal({ | 
| 1876 | 
            +
                assert_equal({ '-1' => '1', '0' => '0', '1' => '1' }, res.to_hash)
         | 
| 1874 1877 | 
             
              end
         | 
| 1875 1878 |  | 
| 1876 | 
            -
              it  | 
| 1879 | 
            +
              it 'has a working function #ghashtable_utf8_container_out' do
         | 
| 1877 1880 | 
             
                res = GIMarshallingTests.ghashtable_utf8_container_out
         | 
| 1878 | 
            -
                assert_equal({ | 
| 1881 | 
            +
                assert_equal({ '-1' => '1', '0' => '0', '1' => '-1', '2' => '-2' },
         | 
| 1879 1882 | 
             
                             res.to_hash)
         | 
| 1880 1883 | 
             
              end
         | 
| 1881 1884 |  | 
| 1882 | 
            -
              it  | 
| 1885 | 
            +
              it 'has a working function #ghashtable_utf8_container_return' do
         | 
| 1883 1886 | 
             
                res = GIMarshallingTests.ghashtable_utf8_container_return
         | 
| 1884 | 
            -
                assert_equal({ | 
| 1887 | 
            +
                assert_equal({ '-1' => '1', '0' => '0', '1' => '-1', '2' => '-2' },
         | 
| 1885 1888 | 
             
                             res.to_hash)
         | 
| 1886 1889 | 
             
              end
         | 
| 1887 1890 |  | 
| 1888 | 
            -
              it  | 
| 1889 | 
            -
                skip  | 
| 1891 | 
            +
              it 'has a working function #ghashtable_utf8_full_in' do
         | 
| 1892 | 
            +
                skip 'This function is defined in the header but not implemented'
         | 
| 1890 1893 | 
             
              end
         | 
| 1891 1894 |  | 
| 1892 | 
            -
              it  | 
| 1893 | 
            -
                hsh = { | 
| 1895 | 
            +
              it 'has a working function #ghashtable_utf8_full_inout' do
         | 
| 1896 | 
            +
                hsh = { '-1' => '1', '0' => '0', '1' => '-1', '2' => '-2' }
         | 
| 1894 1897 | 
             
                res = GIMarshallingTests.ghashtable_utf8_full_inout hsh
         | 
| 1895 | 
            -
                assert_equal({ | 
| 1898 | 
            +
                assert_equal({ '-1' => '1', '0' => '0', '1' => '1' }, res.to_hash)
         | 
| 1896 1899 | 
             
              end
         | 
| 1897 1900 |  | 
| 1898 | 
            -
              it  | 
| 1901 | 
            +
              it 'has a working function #ghashtable_utf8_full_out' do
         | 
| 1899 1902 | 
             
                res = GIMarshallingTests.ghashtable_utf8_full_out
         | 
| 1900 | 
            -
                assert_equal({ | 
| 1903 | 
            +
                assert_equal({ '-1' => '1', '0' => '0', '1' => '-1', '2' => '-2' },
         | 
| 1901 1904 | 
             
                             res.to_hash)
         | 
| 1902 1905 | 
             
              end
         | 
| 1903 1906 |  | 
| 1904 | 
            -
              it  | 
| 1907 | 
            +
              it 'has a working function #ghashtable_utf8_full_return' do
         | 
| 1905 1908 | 
             
                res = GIMarshallingTests.ghashtable_utf8_full_return
         | 
| 1906 | 
            -
                assert_equal({ | 
| 1909 | 
            +
                assert_equal({ '-1' => '1', '0' => '0', '1' => '-1', '2' => '-2' },
         | 
| 1907 1910 | 
             
                             res.to_hash)
         | 
| 1908 1911 | 
             
              end
         | 
| 1909 1912 |  | 
| 1910 | 
            -
              it  | 
| 1911 | 
            -
                hsh = { | 
| 1913 | 
            +
              it 'has a working function #ghashtable_utf8_none_in' do
         | 
| 1914 | 
            +
                hsh = { '-1' => '1', '0' => '0', '1' => '-1', '2' => '-2' }
         | 
| 1912 1915 | 
             
                GIMarshallingTests.ghashtable_utf8_none_in hsh
         | 
| 1913 1916 | 
             
                pass
         | 
| 1914 1917 | 
             
              end
         | 
| 1915 1918 |  | 
| 1916 | 
            -
              it  | 
| 1917 | 
            -
                hsh = { | 
| 1919 | 
            +
              it 'has a working function #ghashtable_utf8_none_inout' do
         | 
| 1920 | 
            +
                hsh = { '-1' => '1', '0' => '0', '1' => '-1', '2' => '-2' }
         | 
| 1918 1921 | 
             
                res = GIMarshallingTests.ghashtable_utf8_none_inout hsh
         | 
| 1919 | 
            -
                assert_equal({ | 
| 1922 | 
            +
                assert_equal({ '-1' => '1', '0' => '0', '1' => '1' }, res.to_hash)
         | 
| 1920 1923 | 
             
              end
         | 
| 1921 1924 |  | 
| 1922 | 
            -
              it  | 
| 1925 | 
            +
              it 'has a working function #ghashtable_utf8_none_out' do
         | 
| 1923 1926 | 
             
                res = GIMarshallingTests.ghashtable_utf8_none_out
         | 
| 1924 | 
            -
                assert_equal({ | 
| 1927 | 
            +
                assert_equal({ '-1' => '1', '0' => '0', '1' => '-1', '2' => '-2' },
         | 
| 1925 1928 | 
             
                             res.to_hash)
         | 
| 1926 1929 | 
             
              end
         | 
| 1927 1930 |  | 
| 1928 | 
            -
              it  | 
| 1931 | 
            +
              it 'has a working function #ghashtable_utf8_none_return' do
         | 
| 1929 1932 | 
             
                res = GIMarshallingTests.ghashtable_utf8_none_return
         | 
| 1930 | 
            -
                assert_equal({ | 
| 1933 | 
            +
                assert_equal({ '-1' => '1', '0' => '0', '1' => '-1', '2' => '-2' },
         | 
| 1931 1934 | 
             
                             res.to_hash)
         | 
| 1932 1935 | 
             
              end
         | 
| 1933 1936 |  | 
| 1934 | 
            -
              it  | 
| 1937 | 
            +
              it 'has a working function #glist_int_none_in' do
         | 
| 1935 1938 | 
             
                GIMarshallingTests.glist_int_none_in [-1, 0, 1, 2]
         | 
| 1936 1939 | 
             
                pass
         | 
| 1937 1940 | 
             
              end
         | 
| 1938 1941 |  | 
| 1939 | 
            -
              it  | 
| 1942 | 
            +
              it 'has a working function #glist_int_none_return' do
         | 
| 1940 1943 | 
             
                res = GIMarshallingTests.glist_int_none_return
         | 
| 1941 1944 | 
             
                res.must_be :==, [-1, 0, 1, 2]
         | 
| 1942 1945 | 
             
              end
         | 
| 1943 1946 |  | 
| 1944 | 
            -
              it  | 
| 1947 | 
            +
              it 'has a working function #glist_uint32_none_in' do
         | 
| 1945 1948 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'glist_uint32_none_in'
         | 
| 1946 1949 | 
             
                GIMarshallingTests.glist_uint32_none_in [0, 0xffff_ffff]
         | 
| 1947 1950 | 
             
                pass
         | 
| 1948 1951 | 
             
              end
         | 
| 1949 1952 |  | 
| 1950 | 
            -
              it  | 
| 1953 | 
            +
              it 'has a working function #glist_uint32_none_return' do
         | 
| 1951 1954 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'glist_uint32_none_return'
         | 
| 1952 1955 | 
             
                res = GIMarshallingTests.glist_uint32_none_return
         | 
| 1953 1956 | 
             
                res.must_be :==, [0, 0xffff_ffff]
         | 
| 1954 1957 | 
             
              end
         | 
| 1955 1958 |  | 
| 1956 | 
            -
              it  | 
| 1957 | 
            -
                res = GIMarshallingTests.glist_utf8_container_inout  | 
| 1958 | 
            -
                res.must_be :==, [ | 
| 1959 | 
            +
              it 'has a working function #glist_utf8_container_inout' do
         | 
| 1960 | 
            +
                res = GIMarshallingTests.glist_utf8_container_inout %w(0 1 2)
         | 
| 1961 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 1959 1962 | 
             
              end
         | 
| 1960 1963 |  | 
| 1961 | 
            -
              it  | 
| 1964 | 
            +
              it 'has a working function #glist_utf8_container_out' do
         | 
| 1962 1965 | 
             
                res = GIMarshallingTests.glist_utf8_container_out
         | 
| 1963 | 
            -
                res.must_be :==,  | 
| 1966 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1964 1967 | 
             
              end
         | 
| 1965 1968 |  | 
| 1966 | 
            -
              it  | 
| 1969 | 
            +
              it 'has a working function #glist_utf8_container_return' do
         | 
| 1967 1970 | 
             
                res = GIMarshallingTests.glist_utf8_container_return
         | 
| 1968 | 
            -
                res.must_be :==,  | 
| 1971 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1969 1972 | 
             
              end
         | 
| 1970 1973 |  | 
| 1971 | 
            -
              it  | 
| 1972 | 
            -
                res = GIMarshallingTests.glist_utf8_full_inout  | 
| 1973 | 
            -
                res.must_be :==, [ | 
| 1974 | 
            +
              it 'has a working function #glist_utf8_full_inout' do
         | 
| 1975 | 
            +
                res = GIMarshallingTests.glist_utf8_full_inout %w(0 1 2)
         | 
| 1976 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 1974 1977 | 
             
              end
         | 
| 1975 1978 |  | 
| 1976 | 
            -
              it  | 
| 1979 | 
            +
              it 'has a working function #glist_utf8_full_out' do
         | 
| 1977 1980 | 
             
                res = GIMarshallingTests.glist_utf8_full_out
         | 
| 1978 | 
            -
                res.must_be :==,  | 
| 1981 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1979 1982 | 
             
              end
         | 
| 1980 1983 |  | 
| 1981 | 
            -
              it  | 
| 1984 | 
            +
              it 'has a working function #glist_utf8_full_return' do
         | 
| 1982 1985 | 
             
                res = GIMarshallingTests.glist_utf8_full_return
         | 
| 1983 | 
            -
                res.must_be :==,  | 
| 1986 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1984 1987 | 
             
              end
         | 
| 1985 1988 |  | 
| 1986 | 
            -
              it  | 
| 1987 | 
            -
                GIMarshallingTests.glist_utf8_none_in  | 
| 1989 | 
            +
              it 'has a working function #glist_utf8_none_in' do
         | 
| 1990 | 
            +
                GIMarshallingTests.glist_utf8_none_in %w(0 1 2)
         | 
| 1988 1991 | 
             
              end
         | 
| 1989 1992 |  | 
| 1990 | 
            -
              it  | 
| 1991 | 
            -
                res = GIMarshallingTests.glist_utf8_none_inout  | 
| 1992 | 
            -
                res.must_be :==, [ | 
| 1993 | 
            +
              it 'has a working function #glist_utf8_none_inout' do
         | 
| 1994 | 
            +
                res = GIMarshallingTests.glist_utf8_none_inout %w(0 1 2)
         | 
| 1995 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 1993 1996 | 
             
              end
         | 
| 1994 1997 |  | 
| 1995 | 
            -
              it  | 
| 1998 | 
            +
              it 'has a working function #glist_utf8_none_out' do
         | 
| 1996 1999 | 
             
                res = GIMarshallingTests.glist_utf8_none_out
         | 
| 1997 | 
            -
                res.must_be :==,  | 
| 2000 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 1998 2001 | 
             
              end
         | 
| 1999 2002 |  | 
| 2000 | 
            -
              it  | 
| 2003 | 
            +
              it 'has a working function #glist_utf8_none_return' do
         | 
| 2001 2004 | 
             
                res = GIMarshallingTests.glist_utf8_none_return
         | 
| 2002 | 
            -
                res.must_be :==,  | 
| 2005 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2003 2006 | 
             
              end
         | 
| 2004 2007 |  | 
| 2005 | 
            -
              it  | 
| 2006 | 
            -
                res = GIMarshallingTests.gptrarray_utf8_container_inout  | 
| 2007 | 
            -
                res.must_be :==, [ | 
| 2008 | 
            +
              it 'has a working function #gptrarray_utf8_container_inout' do
         | 
| 2009 | 
            +
                res = GIMarshallingTests.gptrarray_utf8_container_inout %w(0 1 2)
         | 
| 2010 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 2008 2011 | 
             
              end
         | 
| 2009 2012 |  | 
| 2010 | 
            -
              it  | 
| 2013 | 
            +
              it 'has a working function #gptrarray_utf8_container_out' do
         | 
| 2011 2014 | 
             
                res = GIMarshallingTests.gptrarray_utf8_container_out
         | 
| 2012 | 
            -
                res.must_be :==,  | 
| 2015 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2013 2016 | 
             
              end
         | 
| 2014 2017 |  | 
| 2015 | 
            -
              it  | 
| 2018 | 
            +
              it 'has a working function #gptrarray_utf8_container_return' do
         | 
| 2016 2019 | 
             
                res = GIMarshallingTests.gptrarray_utf8_container_return
         | 
| 2017 | 
            -
                res.must_be :==,  | 
| 2020 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2018 2021 | 
             
              end
         | 
| 2019 2022 |  | 
| 2020 | 
            -
              it  | 
| 2021 | 
            -
                res = GIMarshallingTests.gptrarray_utf8_full_inout  | 
| 2022 | 
            -
                res.must_be :==, [ | 
| 2023 | 
            +
              it 'has a working function #gptrarray_utf8_full_inout' do
         | 
| 2024 | 
            +
                res = GIMarshallingTests.gptrarray_utf8_full_inout %w(0 1 2)
         | 
| 2025 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 2023 2026 | 
             
              end
         | 
| 2024 2027 |  | 
| 2025 | 
            -
              it  | 
| 2028 | 
            +
              it 'has a working function #gptrarray_utf8_full_out' do
         | 
| 2026 2029 | 
             
                res = GIMarshallingTests.gptrarray_utf8_full_out
         | 
| 2027 | 
            -
                res.must_be :==,  | 
| 2030 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2028 2031 | 
             
              end
         | 
| 2029 2032 |  | 
| 2030 | 
            -
              it  | 
| 2033 | 
            +
              it 'has a working function #gptrarray_utf8_full_return' do
         | 
| 2031 2034 | 
             
                res = GIMarshallingTests.gptrarray_utf8_full_return
         | 
| 2032 | 
            -
                res.must_be :==,  | 
| 2035 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2033 2036 | 
             
              end
         | 
| 2034 2037 |  | 
| 2035 | 
            -
              it  | 
| 2036 | 
            -
                GIMarshallingTests.gptrarray_utf8_none_in  | 
| 2038 | 
            +
              it 'has a working function #gptrarray_utf8_none_in' do
         | 
| 2039 | 
            +
                GIMarshallingTests.gptrarray_utf8_none_in %w(0 1 2)
         | 
| 2037 2040 | 
             
              end
         | 
| 2038 2041 |  | 
| 2039 | 
            -
              it  | 
| 2040 | 
            -
                res = GIMarshallingTests.gptrarray_utf8_none_inout  | 
| 2041 | 
            -
                res.must_be :==, [ | 
| 2042 | 
            +
              it 'has a working function #gptrarray_utf8_none_inout' do
         | 
| 2043 | 
            +
                res = GIMarshallingTests.gptrarray_utf8_none_inout %w(0 1 2)
         | 
| 2044 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 2042 2045 | 
             
              end
         | 
| 2043 2046 |  | 
| 2044 | 
            -
              it  | 
| 2047 | 
            +
              it 'has a working function #gptrarray_utf8_none_out' do
         | 
| 2045 2048 | 
             
                res = GIMarshallingTests.gptrarray_utf8_none_out
         | 
| 2046 | 
            -
                res.must_be :==,  | 
| 2049 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2047 2050 | 
             
              end
         | 
| 2048 2051 |  | 
| 2049 | 
            -
              it  | 
| 2052 | 
            +
              it 'has a working function #gptrarray_utf8_none_return' do
         | 
| 2050 2053 | 
             
                res = GIMarshallingTests.gptrarray_utf8_none_return
         | 
| 2051 | 
            -
                res.must_be :==,  | 
| 2054 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2052 2055 | 
             
              end
         | 
| 2053 2056 |  | 
| 2054 | 
            -
              it  | 
| 2057 | 
            +
              it 'has a working function #gslist_int_none_in' do
         | 
| 2055 2058 | 
             
                GIMarshallingTests.gslist_int_none_in [-1, 0, 1, 2]
         | 
| 2056 2059 | 
             
                pass
         | 
| 2057 2060 | 
             
              end
         | 
| 2058 2061 |  | 
| 2059 | 
            -
              it  | 
| 2062 | 
            +
              it 'has a working function #gslist_int_none_return' do
         | 
| 2060 2063 | 
             
                res = GIMarshallingTests.gslist_int_none_return
         | 
| 2061 2064 | 
             
                res.must_be :==, [-1, 0, 1, 2]
         | 
| 2062 2065 | 
             
              end
         | 
| 2063 2066 |  | 
| 2064 | 
            -
              it  | 
| 2065 | 
            -
                res = GIMarshallingTests.gslist_utf8_container_inout  | 
| 2066 | 
            -
                res.must_be :==, [ | 
| 2067 | 
            +
              it 'has a working function #gslist_utf8_container_inout' do
         | 
| 2068 | 
            +
                res = GIMarshallingTests.gslist_utf8_container_inout %w(0 1 2)
         | 
| 2069 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 2067 2070 | 
             
              end
         | 
| 2068 2071 |  | 
| 2069 | 
            -
              it  | 
| 2072 | 
            +
              it 'has a working function #gslist_utf8_container_out' do
         | 
| 2070 2073 | 
             
                res = GIMarshallingTests.gslist_utf8_container_out
         | 
| 2071 | 
            -
                res.must_be :==,  | 
| 2074 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2072 2075 | 
             
              end
         | 
| 2073 2076 |  | 
| 2074 | 
            -
              it  | 
| 2077 | 
            +
              it 'has a working function #gslist_utf8_container_return' do
         | 
| 2075 2078 | 
             
                res = GIMarshallingTests.gslist_utf8_container_return
         | 
| 2076 | 
            -
                res.must_be :==,  | 
| 2079 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2077 2080 | 
             
              end
         | 
| 2078 2081 |  | 
| 2079 | 
            -
              it  | 
| 2080 | 
            -
                res = GIMarshallingTests.gslist_utf8_full_inout  | 
| 2081 | 
            -
                res.must_be :==, [ | 
| 2082 | 
            +
              it 'has a working function #gslist_utf8_full_inout' do
         | 
| 2083 | 
            +
                res = GIMarshallingTests.gslist_utf8_full_inout %w(0 1 2)
         | 
| 2084 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 2082 2085 | 
             
              end
         | 
| 2083 2086 |  | 
| 2084 | 
            -
              it  | 
| 2087 | 
            +
              it 'has a working function #gslist_utf8_full_out' do
         | 
| 2085 2088 | 
             
                res = GIMarshallingTests.gslist_utf8_full_out
         | 
| 2086 | 
            -
                res.must_be :==,  | 
| 2089 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2087 2090 | 
             
              end
         | 
| 2088 2091 |  | 
| 2089 | 
            -
              it  | 
| 2092 | 
            +
              it 'has a working function #gslist_utf8_full_return' do
         | 
| 2090 2093 | 
             
                res = GIMarshallingTests.gslist_utf8_full_return
         | 
| 2091 | 
            -
                res.must_be :==,  | 
| 2094 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2092 2095 | 
             
              end
         | 
| 2093 2096 |  | 
| 2094 | 
            -
              it  | 
| 2095 | 
            -
                GIMarshallingTests.gslist_utf8_none_in  | 
| 2097 | 
            +
              it 'has a working function #gslist_utf8_none_in' do
         | 
| 2098 | 
            +
                GIMarshallingTests.gslist_utf8_none_in %w(0 1 2)
         | 
| 2096 2099 | 
             
                pass
         | 
| 2097 2100 | 
             
              end
         | 
| 2098 2101 |  | 
| 2099 | 
            -
              it  | 
| 2100 | 
            -
                res = GIMarshallingTests.gslist_utf8_none_inout  | 
| 2101 | 
            -
                res.must_be :==, [ | 
| 2102 | 
            +
              it 'has a working function #gslist_utf8_none_inout' do
         | 
| 2103 | 
            +
                res = GIMarshallingTests.gslist_utf8_none_inout %w(0 1 2)
         | 
| 2104 | 
            +
                res.must_be :==, ['-2', '-1', '0', '1']
         | 
| 2102 2105 | 
             
              end
         | 
| 2103 2106 |  | 
| 2104 | 
            -
              it  | 
| 2107 | 
            +
              it 'has a working function #gslist_utf8_none_out' do
         | 
| 2105 2108 | 
             
                res = GIMarshallingTests.gslist_utf8_none_out
         | 
| 2106 | 
            -
                res.must_be :==,  | 
| 2109 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2107 2110 | 
             
              end
         | 
| 2108 2111 |  | 
| 2109 | 
            -
              it  | 
| 2112 | 
            +
              it 'has a working function #gslist_utf8_none_return' do
         | 
| 2110 2113 | 
             
                res = GIMarshallingTests.gslist_utf8_none_return
         | 
| 2111 | 
            -
                res.must_be :==,  | 
| 2114 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2112 2115 | 
             
              end
         | 
| 2113 2116 |  | 
| 2114 | 
            -
              it  | 
| 2115 | 
            -
                GIMarshallingTests.gstrv_in  | 
| 2117 | 
            +
              it 'has a working function #gstrv_in' do
         | 
| 2118 | 
            +
                GIMarshallingTests.gstrv_in %w(0 1 2)
         | 
| 2116 2119 | 
             
                pass
         | 
| 2117 2120 | 
             
              end
         | 
| 2118 2121 |  | 
| 2119 | 
            -
              it  | 
| 2120 | 
            -
                res = GIMarshallingTests.gstrv_inout  | 
| 2121 | 
            -
                res.must_be :==, [ | 
| 2122 | 
            +
              it 'has a working function #gstrv_inout' do
         | 
| 2123 | 
            +
                res = GIMarshallingTests.gstrv_inout %w(0 1 2)
         | 
| 2124 | 
            +
                res.must_be :==, ['-1', '0', '1', '2']
         | 
| 2122 2125 | 
             
              end
         | 
| 2123 2126 |  | 
| 2124 | 
            -
              it  | 
| 2127 | 
            +
              it 'has a working function #gstrv_out' do
         | 
| 2125 2128 | 
             
                res = GIMarshallingTests.gstrv_out
         | 
| 2126 | 
            -
                res.must_be :==,  | 
| 2129 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2127 2130 | 
             
              end
         | 
| 2128 2131 |  | 
| 2129 | 
            -
              it  | 
| 2132 | 
            +
              it 'has a working function #gstrv_return' do
         | 
| 2130 2133 | 
             
                res = GIMarshallingTests.gstrv_return
         | 
| 2131 | 
            -
                res.must_be :==,  | 
| 2134 | 
            +
                res.must_be :==, %w(0 1 2)
         | 
| 2132 2135 | 
             
              end
         | 
| 2133 2136 |  | 
| 2134 | 
            -
              it  | 
| 2137 | 
            +
              it 'has a working function #gtype_in' do
         | 
| 2135 2138 | 
             
                GIMarshallingTests.gtype_in GObject::TYPE_NONE
         | 
| 2136 2139 | 
             
                pass
         | 
| 2137 2140 | 
             
              end
         | 
| 2138 2141 |  | 
| 2139 | 
            -
              it  | 
| 2142 | 
            +
              it 'has a working function #gtype_inout' do
         | 
| 2140 2143 | 
             
                res = GIMarshallingTests.gtype_inout GObject::TYPE_NONE
         | 
| 2141 2144 | 
             
                res.must_equal GObject::TYPE_INT
         | 
| 2142 2145 | 
             
              end
         | 
| 2143 2146 |  | 
| 2144 | 
            -
              it  | 
| 2147 | 
            +
              it 'has a working function #gtype_out' do
         | 
| 2145 2148 | 
             
                res = GIMarshallingTests.gtype_out
         | 
| 2146 2149 | 
             
                res.must_equal GObject::TYPE_NONE
         | 
| 2147 2150 | 
             
              end
         | 
| 2148 2151 |  | 
| 2149 | 
            -
              it  | 
| 2152 | 
            +
              it 'has a working function #gtype_return' do
         | 
| 2150 2153 | 
             
                res = GIMarshallingTests.gtype_return
         | 
| 2151 2154 | 
             
                res.must_equal GObject::TYPE_NONE
         | 
| 2152 2155 | 
             
              end
         | 
| 2153 2156 |  | 
| 2154 | 
            -
              it  | 
| 2157 | 
            +
              it 'has a working function #gtype_string_in' do
         | 
| 2155 2158 | 
             
                GIMarshallingTests.gtype_string_in GObject::TYPE_STRING
         | 
| 2156 2159 | 
             
                pass
         | 
| 2157 2160 | 
             
              end
         | 
| 2158 2161 |  | 
| 2159 | 
            -
              it  | 
| 2162 | 
            +
              it 'has a working function #gtype_string_out' do
         | 
| 2160 2163 | 
             
                res = GIMarshallingTests.gtype_string_out
         | 
| 2161 2164 | 
             
                res.must_equal GObject::TYPE_STRING
         | 
| 2162 2165 | 
             
              end
         | 
| 2163 2166 |  | 
| 2164 | 
            -
              it  | 
| 2167 | 
            +
              it 'has a working function #gtype_string_return' do
         | 
| 2165 2168 | 
             
                res = GIMarshallingTests.gtype_string_return
         | 
| 2166 2169 | 
             
                res.must_equal GObject::TYPE_STRING
         | 
| 2167 2170 | 
             
              end
         | 
| 2168 2171 |  | 
| 2169 | 
            -
              it  | 
| 2170 | 
            -
                GIMarshallingTests.gvalue_flat_array [42,  | 
| 2172 | 
            +
              it 'has a working function #gvalue_flat_array' do
         | 
| 2173 | 
            +
                GIMarshallingTests.gvalue_flat_array [42, '42', true]
         | 
| 2171 2174 | 
             
                pass
         | 
| 2172 2175 | 
             
              end
         | 
| 2173 2176 |  | 
| 2174 | 
            -
              it  | 
| 2175 | 
            -
                result = GIMarshallingTests.gvalue_flat_array_round_trip 42,  | 
| 2177 | 
            +
              it 'has a working function #gvalue_flat_array_round_trip' do
         | 
| 2178 | 
            +
                result = GIMarshallingTests.gvalue_flat_array_round_trip 42, '42', true
         | 
| 2176 2179 | 
             
                arr = result.to_a
         | 
| 2177 2180 | 
             
                arr[0].get_value.must_equal 42
         | 
| 2178 | 
            -
                arr[1].get_value.must_equal  | 
| 2181 | 
            +
                arr[1].get_value.must_equal '42'
         | 
| 2179 2182 | 
             
                arr[2].get_value.must_equal true
         | 
| 2180 2183 | 
             
              end
         | 
| 2181 2184 |  | 
| 2182 | 
            -
              it  | 
| 2185 | 
            +
              it 'has a working function #gvalue_in' do
         | 
| 2183 2186 | 
             
                GIMarshallingTests.gvalue_in GObject::Value.wrap_ruby_value(42)
         | 
| 2184 2187 | 
             
                GIMarshallingTests.gvalue_in 42
         | 
| 2185 2188 | 
             
                pass
         | 
| 2186 2189 | 
             
              end
         | 
| 2187 2190 |  | 
| 2188 | 
            -
              it  | 
| 2191 | 
            +
              it 'has a working function #gvalue_in_enum' do
         | 
| 2189 2192 | 
             
                gv = GObject::Value.new
         | 
| 2190 2193 | 
             
                gv.init GIMarshallingTests::GEnum.get_gtype
         | 
| 2191 2194 | 
             
                gv.set_enum GIMarshallingTests::GEnum[:value3]
         | 
| @@ -2193,28 +2196,28 @@ describe GIMarshallingTests do | |
| 2193 2196 | 
             
                pass
         | 
| 2194 2197 | 
             
              end
         | 
| 2195 2198 |  | 
| 2196 | 
            -
              it  | 
| 2199 | 
            +
              it 'has a working function #gvalue_in_with_modification' do
         | 
| 2197 2200 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'gvalue_in_with_modification'
         | 
| 2198 2201 | 
             
                gv = GObject::Value.wrap_ruby_value(42)
         | 
| 2199 2202 | 
             
                GIMarshallingTests.gvalue_in_with_modification gv
         | 
| 2200 2203 | 
             
                gv.get_value.must_equal 24
         | 
| 2201 2204 | 
             
              end
         | 
| 2202 2205 |  | 
| 2203 | 
            -
              it  | 
| 2206 | 
            +
              it 'has a working function #gvalue_in_with_type' do
         | 
| 2204 2207 | 
             
                gv = GObject::Value.new
         | 
| 2205 2208 | 
             
                gv.init GIMarshallingTests::SubSubObject.get_gtype
         | 
| 2206 2209 | 
             
                GIMarshallingTests.gvalue_in_with_type gv, GIMarshallingTests::Object.get_gtype
         | 
| 2207 2210 | 
             
              end
         | 
| 2208 2211 |  | 
| 2209 | 
            -
              it  | 
| 2212 | 
            +
              it 'has a working function #gvalue_inout' do
         | 
| 2210 2213 | 
             
                res = GIMarshallingTests.gvalue_inout GObject::Value.wrap_ruby_value(42)
         | 
| 2211 | 
            -
                assert_equal  | 
| 2214 | 
            +
                assert_equal '42', res.get_value
         | 
| 2212 2215 |  | 
| 2213 2216 | 
             
                res = GIMarshallingTests.gvalue_inout 42
         | 
| 2214 | 
            -
                assert_equal  | 
| 2217 | 
            +
                assert_equal '42', res.get_value
         | 
| 2215 2218 | 
             
              end
         | 
| 2216 2219 |  | 
| 2217 | 
            -
              it  | 
| 2220 | 
            +
              it 'has a working function #gvalue_int64_in' do
         | 
| 2218 2221 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'gvalue_int64_in'
         | 
| 2219 2222 | 
             
                gv = GObject::Value.new
         | 
| 2220 2223 | 
             
                gv.init GObject::TYPE_INT64
         | 
| @@ -2223,724 +2226,723 @@ describe GIMarshallingTests do | |
| 2223 2226 | 
             
                pass
         | 
| 2224 2227 | 
             
              end
         | 
| 2225 2228 |  | 
| 2226 | 
            -
              it  | 
| 2229 | 
            +
              it 'has a working function #gvalue_int64_out' do
         | 
| 2227 2230 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'gvalue_int64_out'
         | 
| 2228 2231 | 
             
                gv = GIMarshallingTests.gvalue_int64_out
         | 
| 2229 2232 | 
             
                gv.get_value.must_equal 0x7fff_ffff_ffff_ffff
         | 
| 2230 2233 | 
             
              end
         | 
| 2231 2234 |  | 
| 2232 | 
            -
              it  | 
| 2235 | 
            +
              it 'has a working function #gvalue_out' do
         | 
| 2233 2236 | 
             
                res = GIMarshallingTests.gvalue_out
         | 
| 2234 2237 | 
             
                assert_equal 42, res.get_value
         | 
| 2235 2238 | 
             
              end
         | 
| 2236 2239 |  | 
| 2237 | 
            -
              it  | 
| 2240 | 
            +
              it 'has a working function #gvalue_out_caller_allocates' do
         | 
| 2238 2241 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'gvalue_out_caller_allocates'
         | 
| 2239 2242 | 
             
                res = GIMarshallingTests.gvalue_out_caller_allocates
         | 
| 2240 2243 | 
             
                res.get_value.must_equal 42
         | 
| 2241 2244 | 
             
              end
         | 
| 2242 2245 |  | 
| 2243 | 
            -
              it  | 
| 2246 | 
            +
              it 'has a working function #gvalue_return' do
         | 
| 2244 2247 | 
             
                res = GIMarshallingTests.gvalue_return
         | 
| 2245 2248 | 
             
                assert_equal 42, res.get_value
         | 
| 2246 2249 | 
             
              end
         | 
| 2247 2250 |  | 
| 2248 | 
            -
              it  | 
| 2249 | 
            -
                res, arr = GIMarshallingTests.init_function  | 
| 2251 | 
            +
              it 'has a working function #init_function' do
         | 
| 2252 | 
            +
                res, arr = GIMarshallingTests.init_function %w(foo bar baz)
         | 
| 2250 2253 | 
             
                res.must_equal true
         | 
| 2251 | 
            -
                arr.must_be :==,  | 
| 2254 | 
            +
                arr.must_be :==, %w(foo bar)
         | 
| 2252 2255 | 
             
              end
         | 
| 2253 2256 |  | 
| 2254 | 
            -
              it  | 
| 2257 | 
            +
              it 'has a working function #int16_in_max' do
         | 
| 2255 2258 | 
             
                GIMarshallingTests.int16_in_max 0x7fff
         | 
| 2256 2259 | 
             
                pass
         | 
| 2257 2260 | 
             
              end
         | 
| 2258 2261 |  | 
| 2259 | 
            -
              it  | 
| 2262 | 
            +
              it 'has a working function #int16_in_min' do
         | 
| 2260 2263 | 
             
                GIMarshallingTests.int16_in_min(-0x8000)
         | 
| 2261 2264 | 
             
                pass
         | 
| 2262 2265 | 
             
              end
         | 
| 2263 2266 |  | 
| 2264 | 
            -
              it  | 
| 2267 | 
            +
              it 'has a working function #int16_inout_max_min' do
         | 
| 2265 2268 | 
             
                res = GIMarshallingTests.int16_inout_max_min 0x7fff
         | 
| 2266 2269 | 
             
                assert_equal res, -0x8000
         | 
| 2267 2270 | 
             
              end
         | 
| 2268 2271 |  | 
| 2269 | 
            -
              it  | 
| 2272 | 
            +
              it 'has a working function #int16_inout_min_max' do
         | 
| 2270 2273 | 
             
                res = GIMarshallingTests.int16_inout_min_max(-0x8000)
         | 
| 2271 2274 | 
             
                assert_equal 0x7fff, res
         | 
| 2272 2275 | 
             
              end
         | 
| 2273 2276 |  | 
| 2274 | 
            -
              it  | 
| 2277 | 
            +
              it 'has a working function #int16_out_max' do
         | 
| 2275 2278 | 
             
                res = GIMarshallingTests.int16_out_max
         | 
| 2276 2279 | 
             
                assert_equal 0x7fff, res
         | 
| 2277 2280 | 
             
              end
         | 
| 2278 2281 |  | 
| 2279 | 
            -
              it  | 
| 2282 | 
            +
              it 'has a working function #int16_out_min' do
         | 
| 2280 2283 | 
             
                res = GIMarshallingTests.int16_out_min
         | 
| 2281 2284 | 
             
                assert_equal(-0x8000, res)
         | 
| 2282 2285 | 
             
              end
         | 
| 2283 2286 |  | 
| 2284 | 
            -
              it  | 
| 2287 | 
            +
              it 'has a working function #int16_return_max' do
         | 
| 2285 2288 | 
             
                res = GIMarshallingTests.int16_return_max
         | 
| 2286 2289 | 
             
                assert_equal 0x7fff, res
         | 
| 2287 2290 | 
             
              end
         | 
| 2288 2291 |  | 
| 2289 | 
            -
              it  | 
| 2292 | 
            +
              it 'has a working function #int16_return_min' do
         | 
| 2290 2293 | 
             
                res = GIMarshallingTests.int16_return_min
         | 
| 2291 2294 | 
             
                assert_equal(-0x8000, res)
         | 
| 2292 2295 | 
             
              end
         | 
| 2293 2296 |  | 
| 2294 | 
            -
              it  | 
| 2297 | 
            +
              it 'has a working function #int32_in_max' do
         | 
| 2295 2298 | 
             
                GIMarshallingTests.int32_in_max 0x7fffffff
         | 
| 2296 2299 | 
             
                pass
         | 
| 2297 2300 | 
             
              end
         | 
| 2298 2301 |  | 
| 2299 | 
            -
              it  | 
| 2302 | 
            +
              it 'has a working function #int32_in_min' do
         | 
| 2300 2303 | 
             
                GIMarshallingTests.int32_in_min(-0x80000000)
         | 
| 2301 2304 | 
             
                pass
         | 
| 2302 2305 | 
             
              end
         | 
| 2303 2306 |  | 
| 2304 | 
            -
              it  | 
| 2307 | 
            +
              it 'has a working function #int32_inout_max_min' do
         | 
| 2305 2308 | 
             
                res = GIMarshallingTests.int32_inout_max_min 0x7fffffff
         | 
| 2306 2309 | 
             
                assert_equal(-0x80000000, res)
         | 
| 2307 2310 | 
             
              end
         | 
| 2308 2311 |  | 
| 2309 | 
            -
              it  | 
| 2312 | 
            +
              it 'has a working function #int32_inout_min_max' do
         | 
| 2310 2313 | 
             
                res = GIMarshallingTests.int32_inout_min_max(-0x80000000)
         | 
| 2311 2314 | 
             
                assert_equal 0x7fffffff, res
         | 
| 2312 2315 | 
             
              end
         | 
| 2313 2316 |  | 
| 2314 | 
            -
              it  | 
| 2317 | 
            +
              it 'has a working function #int32_out_max' do
         | 
| 2315 2318 | 
             
                res = GIMarshallingTests.int32_out_max
         | 
| 2316 2319 | 
             
                assert_equal 0x7fffffff, res
         | 
| 2317 2320 | 
             
              end
         | 
| 2318 2321 |  | 
| 2319 | 
            -
              it  | 
| 2322 | 
            +
              it 'has a working function #int32_out_min' do
         | 
| 2320 2323 | 
             
                res = GIMarshallingTests.int32_out_min
         | 
| 2321 2324 | 
             
                assert_equal(-0x80000000, res)
         | 
| 2322 2325 | 
             
              end
         | 
| 2323 2326 |  | 
| 2324 | 
            -
              it  | 
| 2327 | 
            +
              it 'has a working function #int32_return_max' do
         | 
| 2325 2328 | 
             
                res = GIMarshallingTests.int32_return_max
         | 
| 2326 2329 | 
             
                assert_equal 0x7fffffff, res
         | 
| 2327 2330 | 
             
              end
         | 
| 2328 2331 |  | 
| 2329 | 
            -
              it  | 
| 2332 | 
            +
              it 'has a working function #int32_return_min' do
         | 
| 2330 2333 | 
             
                res = GIMarshallingTests.int32_return_min
         | 
| 2331 2334 | 
             
                assert_equal(-0x80000000, res)
         | 
| 2332 2335 | 
             
              end
         | 
| 2333 2336 |  | 
| 2334 | 
            -
              it  | 
| 2337 | 
            +
              it 'has a working function #int64_in_max' do
         | 
| 2335 2338 | 
             
                GIMarshallingTests.int64_in_max 0x7fffffffffffffff
         | 
| 2336 2339 | 
             
                pass
         | 
| 2337 2340 | 
             
              end
         | 
| 2338 2341 |  | 
| 2339 | 
            -
              it  | 
| 2342 | 
            +
              it 'has a working function #int64_in_min' do
         | 
| 2340 2343 | 
             
                GIMarshallingTests.int64_in_min(-0x8000000000000000)
         | 
| 2341 2344 | 
             
                pass
         | 
| 2342 2345 | 
             
              end
         | 
| 2343 2346 |  | 
| 2344 | 
            -
              it  | 
| 2347 | 
            +
              it 'has a working function #int64_inout_max_min' do
         | 
| 2345 2348 | 
             
                res = GIMarshallingTests.int64_inout_max_min 0x7fffffffffffffff
         | 
| 2346 2349 | 
             
                assert_equal(-0x8000000000000000, res)
         | 
| 2347 2350 | 
             
              end
         | 
| 2348 2351 |  | 
| 2349 | 
            -
              it  | 
| 2352 | 
            +
              it 'has a working function #int64_inout_min_max' do
         | 
| 2350 2353 | 
             
                res = GIMarshallingTests.int64_inout_min_max(-0x8000000000000000)
         | 
| 2351 2354 | 
             
                assert_equal 0x7fffffffffffffff, res
         | 
| 2352 2355 | 
             
              end
         | 
| 2353 2356 |  | 
| 2354 | 
            -
              it  | 
| 2357 | 
            +
              it 'has a working function #int64_out_max' do
         | 
| 2355 2358 | 
             
                res = GIMarshallingTests.int64_out_max
         | 
| 2356 2359 | 
             
                assert_equal 0x7fffffffffffffff, res
         | 
| 2357 2360 | 
             
              end
         | 
| 2358 2361 |  | 
| 2359 | 
            -
              it  | 
| 2362 | 
            +
              it 'has a working function #int64_out_min' do
         | 
| 2360 2363 | 
             
                res = GIMarshallingTests.int64_out_min
         | 
| 2361 2364 | 
             
                assert_equal(-0x8000000000000000, res)
         | 
| 2362 2365 | 
             
              end
         | 
| 2363 2366 |  | 
| 2364 | 
            -
              it  | 
| 2367 | 
            +
              it 'has a working function #int64_return_max' do
         | 
| 2365 2368 | 
             
                res = GIMarshallingTests.int64_return_max
         | 
| 2366 2369 | 
             
                assert_equal 0x7fffffffffffffff, res
         | 
| 2367 2370 | 
             
              end
         | 
| 2368 2371 |  | 
| 2369 | 
            -
              it  | 
| 2372 | 
            +
              it 'has a working function #int64_return_min' do
         | 
| 2370 2373 | 
             
                res = GIMarshallingTests.int64_return_min
         | 
| 2371 2374 | 
             
                assert_equal(-0x8000000000000000, res)
         | 
| 2372 2375 | 
             
              end
         | 
| 2373 2376 |  | 
| 2374 | 
            -
              it  | 
| 2377 | 
            +
              it 'has a working function #int8_in_max' do
         | 
| 2375 2378 | 
             
                GIMarshallingTests.int8_in_max 0x7f
         | 
| 2376 2379 | 
             
                pass
         | 
| 2377 2380 | 
             
              end
         | 
| 2378 2381 |  | 
| 2379 | 
            -
              it  | 
| 2382 | 
            +
              it 'has a working function #int8_in_min' do
         | 
| 2380 2383 | 
             
                GIMarshallingTests.int8_in_min(-0x80)
         | 
| 2381 2384 | 
             
                pass
         | 
| 2382 2385 | 
             
              end
         | 
| 2383 2386 |  | 
| 2384 | 
            -
              it  | 
| 2387 | 
            +
              it 'has a working function #int8_inout_max_min' do
         | 
| 2385 2388 | 
             
                res = GIMarshallingTests.int8_inout_max_min 0x7f
         | 
| 2386 2389 | 
             
                assert_equal(-0x80, res)
         | 
| 2387 2390 | 
             
              end
         | 
| 2388 2391 |  | 
| 2389 | 
            -
              it  | 
| 2392 | 
            +
              it 'has a working function #int8_inout_min_max' do
         | 
| 2390 2393 | 
             
                res = GIMarshallingTests.int8_inout_min_max(-0x80)
         | 
| 2391 2394 | 
             
                assert_equal 0x7f, res
         | 
| 2392 2395 | 
             
              end
         | 
| 2393 2396 |  | 
| 2394 | 
            -
              it  | 
| 2397 | 
            +
              it 'has a working function #int8_out_max' do
         | 
| 2395 2398 | 
             
                res = GIMarshallingTests.int8_out_max
         | 
| 2396 2399 | 
             
                assert_equal 0x7f, res
         | 
| 2397 2400 | 
             
              end
         | 
| 2398 2401 |  | 
| 2399 | 
            -
              it  | 
| 2402 | 
            +
              it 'has a working function #int8_out_min' do
         | 
| 2400 2403 | 
             
                res = GIMarshallingTests.int8_out_min
         | 
| 2401 2404 | 
             
                assert_equal(-0x80, res)
         | 
| 2402 2405 | 
             
              end
         | 
| 2403 2406 |  | 
| 2404 | 
            -
              it  | 
| 2407 | 
            +
              it 'has a working function #int8_return_max' do
         | 
| 2405 2408 | 
             
                res = GIMarshallingTests.int8_return_max
         | 
| 2406 2409 | 
             
                assert_equal 0x7f, res
         | 
| 2407 2410 | 
             
              end
         | 
| 2408 2411 |  | 
| 2409 | 
            -
              it  | 
| 2412 | 
            +
              it 'has a working function #int8_return_min' do
         | 
| 2410 2413 | 
             
                res = GIMarshallingTests.int8_return_min
         | 
| 2411 2414 | 
             
                assert_equal(-0x80, res)
         | 
| 2412 2415 | 
             
              end
         | 
| 2413 2416 |  | 
| 2414 | 
            -
              it  | 
| 2417 | 
            +
              it 'has a working function #int_in_max' do
         | 
| 2415 2418 | 
             
                GIMarshallingTests.int_in_max 0x7fffffff
         | 
| 2416 2419 | 
             
                pass
         | 
| 2417 2420 | 
             
              end
         | 
| 2418 2421 |  | 
| 2419 | 
            -
              it  | 
| 2422 | 
            +
              it 'has a working function #int_in_min' do
         | 
| 2420 2423 | 
             
                GIMarshallingTests.int_in_min(-0x80000000)
         | 
| 2421 2424 | 
             
                pass
         | 
| 2422 2425 | 
             
              end
         | 
| 2423 2426 |  | 
| 2424 | 
            -
              it  | 
| 2427 | 
            +
              it 'has a working function #int_inout_max_min' do
         | 
| 2425 2428 | 
             
                res = GIMarshallingTests.int_inout_max_min 0x7fffffff
         | 
| 2426 2429 | 
             
                assert_equal(-0x80000000, res)
         | 
| 2427 2430 | 
             
              end
         | 
| 2428 2431 |  | 
| 2429 | 
            -
              it  | 
| 2432 | 
            +
              it 'has a working function #int_inout_min_max' do
         | 
| 2430 2433 | 
             
                res = GIMarshallingTests.int_inout_min_max(-0x80000000)
         | 
| 2431 2434 | 
             
                assert_equal 0x7fffffff, res
         | 
| 2432 2435 | 
             
              end
         | 
| 2433 2436 |  | 
| 2434 | 
            -
              it  | 
| 2437 | 
            +
              it 'has a working function #int_one_in_utf8_two_in_one_allows_none' do
         | 
| 2435 2438 | 
             
                skip unless get_introspection_data('GIMarshallingTests',
         | 
| 2436 2439 | 
             
                                                   'int_one_in_utf8_two_in_one_allows_none')
         | 
| 2437 | 
            -
                GIMarshallingTests.int_one_in_utf8_two_in_one_allows_none 1,  | 
| 2438 | 
            -
                GIMarshallingTests.int_one_in_utf8_two_in_one_allows_none 1, nil,  | 
| 2440 | 
            +
                GIMarshallingTests.int_one_in_utf8_two_in_one_allows_none 1, '2', '3'
         | 
| 2441 | 
            +
                GIMarshallingTests.int_one_in_utf8_two_in_one_allows_none 1, nil, '3'
         | 
| 2439 2442 | 
             
                pass
         | 
| 2440 2443 | 
             
              end
         | 
| 2441 2444 |  | 
| 2442 | 
            -
              it  | 
| 2445 | 
            +
              it 'has a working function #int_out_max' do
         | 
| 2443 2446 | 
             
                res = GIMarshallingTests.int_out_max
         | 
| 2444 2447 | 
             
                assert_equal 0x7fffffff, res
         | 
| 2445 2448 | 
             
              end
         | 
| 2446 2449 |  | 
| 2447 | 
            -
              it  | 
| 2450 | 
            +
              it 'has a working function #int_out_min' do
         | 
| 2448 2451 | 
             
                res = GIMarshallingTests.int_out_min
         | 
| 2449 2452 | 
             
                assert_equal(-0x80000000, res)
         | 
| 2450 2453 | 
             
              end
         | 
| 2451 2454 |  | 
| 2452 | 
            -
              it  | 
| 2455 | 
            +
              it 'has a working function #int_out_out' do
         | 
| 2453 2456 | 
             
                res = GIMarshallingTests.int_out_out
         | 
| 2454 2457 | 
             
                assert_equal [6, 7], res
         | 
| 2455 2458 | 
             
              end
         | 
| 2456 2459 |  | 
| 2457 | 
            -
              it  | 
| 2460 | 
            +
              it 'has a working function #int_return_max' do
         | 
| 2458 2461 | 
             
                res = GIMarshallingTests.int_return_max
         | 
| 2459 2462 | 
             
                assert_equal 0x7fffffff, res
         | 
| 2460 2463 | 
             
              end
         | 
| 2461 2464 |  | 
| 2462 | 
            -
              it  | 
| 2465 | 
            +
              it 'has a working function #int_return_min' do
         | 
| 2463 2466 | 
             
                res = GIMarshallingTests.int_return_min
         | 
| 2464 2467 | 
             
                assert_equal(-0x80000000, res)
         | 
| 2465 2468 | 
             
              end
         | 
| 2466 2469 |  | 
| 2467 | 
            -
              it  | 
| 2470 | 
            +
              it 'has a working function #int_return_out' do
         | 
| 2468 2471 | 
             
                res = GIMarshallingTests.int_return_out
         | 
| 2469 2472 | 
             
                assert_equal [6, 7], res
         | 
| 2470 2473 | 
             
              end
         | 
| 2471 2474 |  | 
| 2472 | 
            -
              it  | 
| 2475 | 
            +
              it 'has a working function #int_three_in_three_out' do
         | 
| 2473 2476 | 
             
                res = GIMarshallingTests.int_three_in_three_out 4, 5, 6
         | 
| 2474 2477 | 
             
                assert_equal [4, 5, 6], res
         | 
| 2475 2478 | 
             
              end
         | 
| 2476 2479 |  | 
| 2477 | 
            -
              it  | 
| 2480 | 
            +
              it 'has a working function #int_two_in_utf8_two_in_with_allow_none' do
         | 
| 2478 2481 | 
             
                skip unless get_introspection_data('GIMarshallingTests',
         | 
| 2479 2482 | 
             
                                                   'int_two_in_utf8_two_in_with_allow_none')
         | 
| 2480 | 
            -
                GIMarshallingTests.int_two_in_utf8_two_in_with_allow_none 1, 2,  | 
| 2483 | 
            +
                GIMarshallingTests.int_two_in_utf8_two_in_with_allow_none 1, 2, '3', '4'
         | 
| 2481 2484 | 
             
                GIMarshallingTests.int_two_in_utf8_two_in_with_allow_none 1, 2, nil, nil
         | 
| 2482 2485 | 
             
                pass
         | 
| 2483 2486 | 
             
              end
         | 
| 2484 2487 |  | 
| 2485 | 
            -
              it  | 
| 2488 | 
            +
              it 'has a working function #long_in_max' do
         | 
| 2486 2489 | 
             
                GIMarshallingTests.long_in_max max_long
         | 
| 2487 2490 | 
             
                pass
         | 
| 2488 2491 | 
             
              end
         | 
| 2489 2492 |  | 
| 2490 | 
            -
              it  | 
| 2493 | 
            +
              it 'has a working function #long_in_min' do
         | 
| 2491 2494 | 
             
                GIMarshallingTests.long_in_min min_long
         | 
| 2492 2495 | 
             
                pass
         | 
| 2493 2496 | 
             
              end
         | 
| 2494 2497 |  | 
| 2495 | 
            -
              it  | 
| 2498 | 
            +
              it 'has a working function #long_inout_max_min' do
         | 
| 2496 2499 | 
             
                res = GIMarshallingTests.long_inout_max_min max_long
         | 
| 2497 2500 | 
             
                assert_equal min_long, res
         | 
| 2498 2501 | 
             
              end
         | 
| 2499 2502 |  | 
| 2500 | 
            -
              it  | 
| 2503 | 
            +
              it 'has a working function #long_inout_min_max' do
         | 
| 2501 2504 | 
             
                res = GIMarshallingTests.long_inout_min_max min_long
         | 
| 2502 2505 | 
             
                assert_equal max_long, res
         | 
| 2503 2506 | 
             
              end
         | 
| 2504 2507 |  | 
| 2505 | 
            -
              it  | 
| 2508 | 
            +
              it 'has a working function #long_out_max' do
         | 
| 2506 2509 | 
             
                res = GIMarshallingTests.long_out_max
         | 
| 2507 2510 | 
             
                assert_equal max_long, res
         | 
| 2508 2511 | 
             
              end
         | 
| 2509 2512 |  | 
| 2510 | 
            -
              it  | 
| 2513 | 
            +
              it 'has a working function #long_out_min' do
         | 
| 2511 2514 | 
             
                res = GIMarshallingTests.long_out_min
         | 
| 2512 2515 | 
             
                assert_equal min_long, res
         | 
| 2513 2516 | 
             
              end
         | 
| 2514 2517 |  | 
| 2515 | 
            -
              it  | 
| 2518 | 
            +
              it 'has a working function #long_return_max' do
         | 
| 2516 2519 | 
             
                res = GIMarshallingTests.long_return_max
         | 
| 2517 2520 | 
             
                assert_equal max_long, res
         | 
| 2518 2521 | 
             
              end
         | 
| 2519 2522 |  | 
| 2520 | 
            -
              it  | 
| 2523 | 
            +
              it 'has a working function #long_return_min' do
         | 
| 2521 2524 | 
             
                res = GIMarshallingTests.long_return_min
         | 
| 2522 2525 | 
             
                assert_equal min_long, res
         | 
| 2523 2526 | 
             
              end
         | 
| 2524 2527 |  | 
| 2525 | 
            -
              it  | 
| 2526 | 
            -
                keys =  | 
| 2528 | 
            +
              it 'has a working function #multi_array_key_value_in' do
         | 
| 2529 | 
            +
                keys = %w(one two three)
         | 
| 2527 2530 | 
             
                values = [1, 2, 3].map { |val| GObject::Value.wrap_ruby_value val }
         | 
| 2528 2531 | 
             
                GIMarshallingTests.multi_array_key_value_in keys, values
         | 
| 2529 2532 | 
             
              end
         | 
| 2530 2533 |  | 
| 2531 | 
            -
              it  | 
| 2534 | 
            +
              it 'has a working function #no_type_flags_in' do
         | 
| 2532 2535 | 
             
                GIMarshallingTests.no_type_flags_in :value2
         | 
| 2533 2536 | 
             
                pass
         | 
| 2534 2537 | 
             
              end
         | 
| 2535 2538 |  | 
| 2536 | 
            -
              it  | 
| 2539 | 
            +
              it 'has a working function #no_type_flags_in_zero' do
         | 
| 2537 2540 | 
             
                GIMarshallingTests.no_type_flags_in_zero 0
         | 
| 2538 2541 | 
             
                pass
         | 
| 2539 2542 | 
             
              end
         | 
| 2540 2543 |  | 
| 2541 | 
            -
              it  | 
| 2544 | 
            +
              it 'has a working function #no_type_flags_inout' do
         | 
| 2542 2545 | 
             
                res = GIMarshallingTests.no_type_flags_inout :value2
         | 
| 2543 2546 | 
             
                assert_equal :value1, res
         | 
| 2544 2547 | 
             
              end
         | 
| 2545 2548 |  | 
| 2546 | 
            -
              it  | 
| 2549 | 
            +
              it 'has a working function #no_type_flags_out' do
         | 
| 2547 2550 | 
             
                res = GIMarshallingTests.no_type_flags_out
         | 
| 2548 2551 | 
             
                assert_equal :value2, res
         | 
| 2549 2552 | 
             
              end
         | 
| 2550 2553 |  | 
| 2551 | 
            -
              it  | 
| 2554 | 
            +
              it 'has a working function #no_type_flags_returnv' do
         | 
| 2552 2555 | 
             
                res = GIMarshallingTests.no_type_flags_returnv
         | 
| 2553 2556 | 
             
                assert_equal :value2, res
         | 
| 2554 2557 | 
             
              end
         | 
| 2555 2558 |  | 
| 2556 | 
            -
              it  | 
| 2559 | 
            +
              it 'has a working function #overrides_struct_returnv' do
         | 
| 2557 2560 | 
             
                res = GIMarshallingTests.overrides_struct_returnv
         | 
| 2558 2561 | 
             
                res.must_be_instance_of GIMarshallingTests::OverridesStruct
         | 
| 2559 2562 | 
             
              end
         | 
| 2560 2563 |  | 
| 2561 2564 | 
             
              # TODO: Wait for fixed version of param_spec_in_bool to land in Debian/Ubuntu
         | 
| 2562 2565 | 
             
              # See https://bugzilla.gnome.org/show_bug.cgi?id=728409
         | 
| 2563 | 
            -
              it  | 
| 2564 | 
            -
                skip  | 
| 2565 | 
            -
                ps = GObject.param_spec_boolean  | 
| 2566 | 
            +
              it 'has a working function #param_spec_in_bool' do
         | 
| 2567 | 
            +
                skip 'param_spec_in_bool tests the wrong type'
         | 
| 2568 | 
            +
                ps = GObject.param_spec_boolean 'mybool', 'nick', 'blurb', true, :readable
         | 
| 2566 2569 | 
             
                GIMarshallingTests.param_spec_in_bool ps
         | 
| 2567 2570 | 
             
              end
         | 
| 2568 2571 |  | 
| 2569 | 
            -
              it  | 
| 2572 | 
            +
              it 'has a working function #param_spec_out' do
         | 
| 2570 2573 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'param_spec_out'
         | 
| 2571 2574 | 
             
                res = GIMarshallingTests.param_spec_out
         | 
| 2572 2575 | 
             
                res.value_type.must_equal GObject::TYPE_STRING
         | 
| 2573 | 
            -
                res.get_name.must_equal  | 
| 2576 | 
            +
                res.get_name.must_equal 'test-param'
         | 
| 2574 2577 | 
             
              end
         | 
| 2575 2578 |  | 
| 2576 | 
            -
              it  | 
| 2579 | 
            +
              it 'has a working function #param_spec_return' do
         | 
| 2577 2580 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'param_spec_return'
         | 
| 2578 2581 | 
             
                res = GIMarshallingTests.param_spec_return
         | 
| 2579 2582 | 
             
                res.value_type.must_equal GObject::TYPE_STRING
         | 
| 2580 | 
            -
                res.get_name.must_equal  | 
| 2583 | 
            +
                res.get_name.must_equal 'test-param'
         | 
| 2581 2584 | 
             
              end
         | 
| 2582 2585 |  | 
| 2583 | 
            -
              it  | 
| 2586 | 
            +
              it 'has a working function #pointer_in_return' do
         | 
| 2584 2587 | 
             
                ptr = FFI::MemoryPointer.new 1
         | 
| 2585 2588 | 
             
                res = GIMarshallingTests.pointer_in_return ptr
         | 
| 2586 2589 | 
             
                assert_equal ptr.address, res.address
         | 
| 2587 2590 | 
             
              end
         | 
| 2588 2591 |  | 
| 2589 | 
            -
              it  | 
| 2592 | 
            +
              it 'has a working function #pointer_struct_get_type' do
         | 
| 2590 2593 | 
             
                res = GIMarshallingTests.pointer_struct_get_type
         | 
| 2591 | 
            -
                gtype = GObject.type_from_name  | 
| 2594 | 
            +
                gtype = GObject.type_from_name 'GIMarshallingTestsPointerStruct'
         | 
| 2592 2595 | 
             
                assert_equal gtype, res
         | 
| 2593 2596 | 
             
              end
         | 
| 2594 2597 |  | 
| 2595 | 
            -
              it  | 
| 2598 | 
            +
              it 'has a working function #pointer_struct_returnv' do
         | 
| 2596 2599 | 
             
                res = GIMarshallingTests.pointer_struct_returnv
         | 
| 2597 2600 | 
             
                assert_instance_of GIMarshallingTests::PointerStruct, res
         | 
| 2598 2601 | 
             
                assert_equal 42, res.long_
         | 
| 2599 2602 | 
             
              end
         | 
| 2600 2603 |  | 
| 2601 | 
            -
              it  | 
| 2604 | 
            +
              it 'has a working function #return_gvalue_flat_array' do
         | 
| 2602 2605 | 
             
                result = GIMarshallingTests.return_gvalue_flat_array
         | 
| 2603 2606 | 
             
                arr = result.to_a
         | 
| 2604 2607 | 
             
                arr[0].get_value.must_equal 42
         | 
| 2605 | 
            -
                arr[1].get_value.must_equal  | 
| 2608 | 
            +
                arr[1].get_value.must_equal '42'
         | 
| 2606 2609 | 
             
                arr[2].get_value.must_equal true
         | 
| 2607 2610 | 
             
              end
         | 
| 2608 2611 |  | 
| 2609 | 
            -
              it  | 
| 2612 | 
            +
              it 'has a working function #short_in_max' do
         | 
| 2610 2613 | 
             
                GIMarshallingTests.short_in_max 0x7fff
         | 
| 2611 2614 | 
             
                pass
         | 
| 2612 2615 | 
             
              end
         | 
| 2613 2616 |  | 
| 2614 | 
            -
              it  | 
| 2617 | 
            +
              it 'has a working function #short_in_min' do
         | 
| 2615 2618 | 
             
                GIMarshallingTests.short_in_min(-0x8000)
         | 
| 2616 2619 | 
             
                pass
         | 
| 2617 2620 | 
             
              end
         | 
| 2618 2621 |  | 
| 2619 | 
            -
              it  | 
| 2622 | 
            +
              it 'has a working function #short_inout_max_min' do
         | 
| 2620 2623 | 
             
                res = GIMarshallingTests.short_inout_max_min 0x7fff
         | 
| 2621 2624 | 
             
                assert_equal(-0x8000, res)
         | 
| 2622 2625 | 
             
              end
         | 
| 2623 2626 |  | 
| 2624 | 
            -
              it  | 
| 2627 | 
            +
              it 'has a working function #short_inout_min_max' do
         | 
| 2625 2628 | 
             
                res = GIMarshallingTests.short_inout_min_max(-0x8000)
         | 
| 2626 2629 | 
             
                assert_equal 0x7fff, res
         | 
| 2627 2630 | 
             
              end
         | 
| 2628 2631 |  | 
| 2629 | 
            -
              it  | 
| 2632 | 
            +
              it 'has a working function #short_out_max' do
         | 
| 2630 2633 | 
             
                res = GIMarshallingTests.short_out_max
         | 
| 2631 2634 | 
             
                assert_equal 0x7fff, res
         | 
| 2632 2635 | 
             
              end
         | 
| 2633 2636 |  | 
| 2634 | 
            -
              it  | 
| 2637 | 
            +
              it 'has a working function #short_out_min' do
         | 
| 2635 2638 | 
             
                res = GIMarshallingTests.short_out_min
         | 
| 2636 2639 | 
             
                assert_equal(-0x8000, res)
         | 
| 2637 2640 | 
             
              end
         | 
| 2638 2641 |  | 
| 2639 | 
            -
              it  | 
| 2642 | 
            +
              it 'has a working function #short_return_max' do
         | 
| 2640 2643 | 
             
                res = GIMarshallingTests.short_return_max
         | 
| 2641 2644 | 
             
                assert_equal 0x7fff, res
         | 
| 2642 2645 | 
             
              end
         | 
| 2643 2646 |  | 
| 2644 | 
            -
              it  | 
| 2647 | 
            +
              it 'has a working function #short_return_min' do
         | 
| 2645 2648 | 
             
                res = GIMarshallingTests.short_return_min
         | 
| 2646 2649 | 
             
                assert_equal(-0x8000, res)
         | 
| 2647 2650 | 
             
              end
         | 
| 2648 2651 |  | 
| 2649 | 
            -
              it  | 
| 2652 | 
            +
              it 'has a working function #simple_struct_returnv' do
         | 
| 2650 2653 | 
             
                res = GIMarshallingTests.simple_struct_returnv
         | 
| 2651 2654 | 
             
                assert_instance_of GIMarshallingTests::SimpleStruct, res
         | 
| 2652 2655 | 
             
                assert_equal 6, res.long_
         | 
| 2653 2656 | 
             
                assert_equal 7, res.int8
         | 
| 2654 2657 | 
             
              end
         | 
| 2655 2658 |  | 
| 2656 | 
            -
              it  | 
| 2659 | 
            +
              it 'has a working function #size_in' do
         | 
| 2657 2660 | 
             
                GIMarshallingTests.size_in max_size_t
         | 
| 2658 2661 | 
             
              end
         | 
| 2659 2662 |  | 
| 2660 | 
            -
              it  | 
| 2663 | 
            +
              it 'has a working function #size_inout' do
         | 
| 2661 2664 | 
             
                res = GIMarshallingTests.size_inout max_size_t
         | 
| 2662 2665 | 
             
                assert_equal 0, res
         | 
| 2663 2666 | 
             
              end
         | 
| 2664 2667 |  | 
| 2665 | 
            -
              it  | 
| 2668 | 
            +
              it 'has a working function #size_out' do
         | 
| 2666 2669 | 
             
                res = GIMarshallingTests.size_out
         | 
| 2667 2670 | 
             
                assert_equal max_size_t, res
         | 
| 2668 2671 | 
             
              end
         | 
| 2669 2672 |  | 
| 2670 | 
            -
              it  | 
| 2673 | 
            +
              it 'has a working function #size_return' do
         | 
| 2671 2674 | 
             
                res = GIMarshallingTests.size_return
         | 
| 2672 2675 | 
             
                assert_equal max_size_t, res
         | 
| 2673 2676 | 
             
              end
         | 
| 2674 2677 |  | 
| 2675 | 
            -
              it  | 
| 2678 | 
            +
              it 'has a working function #ssize_in_max' do
         | 
| 2676 2679 | 
             
                GIMarshallingTests.ssize_in_max max_ssize_t
         | 
| 2677 2680 | 
             
                pass
         | 
| 2678 2681 | 
             
              end
         | 
| 2679 2682 |  | 
| 2680 | 
            -
              it  | 
| 2683 | 
            +
              it 'has a working function #ssize_in_min' do
         | 
| 2681 2684 | 
             
                GIMarshallingTests.ssize_in_min min_ssize_t
         | 
| 2682 2685 | 
             
                pass
         | 
| 2683 2686 | 
             
              end
         | 
| 2684 2687 |  | 
| 2685 | 
            -
              it  | 
| 2688 | 
            +
              it 'has a working function #ssize_inout_max_min' do
         | 
| 2686 2689 | 
             
                res = GIMarshallingTests.ssize_inout_max_min max_ssize_t
         | 
| 2687 2690 | 
             
                assert_equal min_ssize_t, res
         | 
| 2688 2691 | 
             
              end
         | 
| 2689 2692 |  | 
| 2690 | 
            -
              it  | 
| 2693 | 
            +
              it 'has a working function #ssize_inout_min_max' do
         | 
| 2691 2694 | 
             
                res = GIMarshallingTests.ssize_inout_min_max min_ssize_t
         | 
| 2692 2695 | 
             
                assert_equal max_ssize_t, res
         | 
| 2693 2696 | 
             
              end
         | 
| 2694 2697 |  | 
| 2695 | 
            -
              it  | 
| 2698 | 
            +
              it 'has a working function #ssize_out_max' do
         | 
| 2696 2699 | 
             
                res = GIMarshallingTests.ssize_out_max
         | 
| 2697 2700 | 
             
                assert_equal max_ssize_t, res
         | 
| 2698 2701 | 
             
              end
         | 
| 2699 2702 |  | 
| 2700 | 
            -
              it  | 
| 2703 | 
            +
              it 'has a working function #ssize_out_min' do
         | 
| 2701 2704 | 
             
                res = GIMarshallingTests.ssize_out_min
         | 
| 2702 2705 | 
             
                assert_equal min_ssize_t, res
         | 
| 2703 2706 | 
             
              end
         | 
| 2704 2707 |  | 
| 2705 | 
            -
              it  | 
| 2708 | 
            +
              it 'has a working function #ssize_return_max' do
         | 
| 2706 2709 | 
             
                res = GIMarshallingTests.ssize_return_max
         | 
| 2707 2710 | 
             
                assert_equal max_ssize_t, res
         | 
| 2708 2711 | 
             
              end
         | 
| 2709 2712 |  | 
| 2710 | 
            -
              it  | 
| 2713 | 
            +
              it 'has a working function #ssize_return_min' do
         | 
| 2711 2714 | 
             
                res = GIMarshallingTests.ssize_return_min
         | 
| 2712 2715 | 
             
                assert_equal min_ssize_t, res
         | 
| 2713 2716 | 
             
              end
         | 
| 2714 2717 |  | 
| 2715 | 
            -
              it  | 
| 2718 | 
            +
              it 'has a working function #test_interface_test_int8_in' do
         | 
| 2716 2719 | 
             
                derived_klass.class_eval { include GIMarshallingTests::Interface }
         | 
| 2717 2720 | 
             
                instance = make_derived_instance do |info|
         | 
| 2718 | 
            -
                  info.install_vfunc_implementation :test_int8_in, proc {|obj, in_| obj.int = in_ }
         | 
| 2721 | 
            +
                  info.install_vfunc_implementation :test_int8_in, proc { |obj, in_| obj.int = in_ }
         | 
| 2719 2722 | 
             
                end
         | 
| 2720 2723 | 
             
                instance.int.must_equal 0
         | 
| 2721 2724 | 
             
                GIMarshallingTests.test_interface_test_int8_in instance, 8
         | 
| 2722 2725 | 
             
                instance.int.must_equal 8
         | 
| 2723 2726 | 
             
              end
         | 
| 2724 2727 |  | 
| 2725 | 
            -
              it  | 
| 2726 | 
            -
                GIMarshallingTests.time_t_in  | 
| 2728 | 
            +
              it 'has a working function #time_t_in' do
         | 
| 2729 | 
            +
                GIMarshallingTests.time_t_in 1_234_567_890
         | 
| 2727 2730 | 
             
                pass
         | 
| 2728 2731 | 
             
              end
         | 
| 2729 2732 |  | 
| 2730 | 
            -
              it  | 
| 2731 | 
            -
                res = GIMarshallingTests.time_t_inout  | 
| 2733 | 
            +
              it 'has a working function #time_t_inout' do
         | 
| 2734 | 
            +
                res = GIMarshallingTests.time_t_inout 1_234_567_890
         | 
| 2732 2735 | 
             
                assert_equal 0, res
         | 
| 2733 2736 | 
             
              end
         | 
| 2734 2737 |  | 
| 2735 | 
            -
              it  | 
| 2738 | 
            +
              it 'has a working function #time_t_out' do
         | 
| 2736 2739 | 
             
                res = GIMarshallingTests.time_t_out
         | 
| 2737 | 
            -
                assert_equal  | 
| 2740 | 
            +
                assert_equal 1_234_567_890, res
         | 
| 2738 2741 | 
             
              end
         | 
| 2739 2742 |  | 
| 2740 | 
            -
              it  | 
| 2743 | 
            +
              it 'has a working function #time_t_return' do
         | 
| 2741 2744 | 
             
                res = GIMarshallingTests.time_t_return
         | 
| 2742 | 
            -
                assert_equal  | 
| 2745 | 
            +
                assert_equal 1_234_567_890, res
         | 
| 2743 2746 | 
             
              end
         | 
| 2744 2747 |  | 
| 2745 | 
            -
              it  | 
| 2748 | 
            +
              it 'has a working function #uint16_in' do
         | 
| 2746 2749 | 
             
                GIMarshallingTests.uint16_in 0xffff
         | 
| 2747 2750 | 
             
                pass
         | 
| 2748 2751 | 
             
              end
         | 
| 2749 2752 |  | 
| 2750 | 
            -
              it  | 
| 2753 | 
            +
              it 'has a working function #uint16_inout' do
         | 
| 2751 2754 | 
             
                res = GIMarshallingTests.uint16_inout 0xffff
         | 
| 2752 2755 | 
             
                assert_equal 0, res
         | 
| 2753 2756 | 
             
              end
         | 
| 2754 2757 |  | 
| 2755 | 
            -
              it  | 
| 2758 | 
            +
              it 'has a working function #uint16_out' do
         | 
| 2756 2759 | 
             
                res = GIMarshallingTests.uint16_out
         | 
| 2757 2760 | 
             
                assert_equal 0xffff, res
         | 
| 2758 2761 | 
             
              end
         | 
| 2759 2762 |  | 
| 2760 | 
            -
              it  | 
| 2763 | 
            +
              it 'has a working function #uint16_return' do
         | 
| 2761 2764 | 
             
                res = GIMarshallingTests.uint16_return
         | 
| 2762 2765 | 
             
                assert_equal 0xffff, res
         | 
| 2763 2766 | 
             
              end
         | 
| 2764 2767 |  | 
| 2765 | 
            -
              it  | 
| 2768 | 
            +
              it 'has a working function #uint32_in' do
         | 
| 2766 2769 | 
             
                GIMarshallingTests.uint32_in 0xffffffff
         | 
| 2767 2770 | 
             
              end
         | 
| 2768 2771 |  | 
| 2769 | 
            -
              it  | 
| 2772 | 
            +
              it 'has a working function #uint32_inout' do
         | 
| 2770 2773 | 
             
                res = GIMarshallingTests.uint32_inout 0xffffffff
         | 
| 2771 2774 | 
             
                assert_equal 0, res
         | 
| 2772 2775 | 
             
              end
         | 
| 2773 2776 |  | 
| 2774 | 
            -
              it  | 
| 2777 | 
            +
              it 'has a working function #uint32_out' do
         | 
| 2775 2778 | 
             
                res = GIMarshallingTests.uint32_out
         | 
| 2776 2779 | 
             
                assert_equal 0xffffffff, res
         | 
| 2777 2780 | 
             
              end
         | 
| 2778 2781 |  | 
| 2779 | 
            -
              it  | 
| 2782 | 
            +
              it 'has a working function #uint32_return' do
         | 
| 2780 2783 | 
             
                res = GIMarshallingTests.uint32_return
         | 
| 2781 2784 | 
             
                assert_equal 0xffffffff, res
         | 
| 2782 2785 | 
             
              end
         | 
| 2783 2786 |  | 
| 2784 | 
            -
              it  | 
| 2787 | 
            +
              it 'has a working function #uint64_in' do
         | 
| 2785 2788 | 
             
                GIMarshallingTests.uint64_in 0xffff_ffff_ffff_ffff
         | 
| 2786 2789 | 
             
                pass
         | 
| 2787 2790 | 
             
              end
         | 
| 2788 2791 |  | 
| 2789 | 
            -
              it  | 
| 2792 | 
            +
              it 'has a working function #uint64_inout' do
         | 
| 2790 2793 | 
             
                res = GIMarshallingTests.uint64_inout 0xffff_ffff_ffff_ffff
         | 
| 2791 2794 | 
             
                assert_equal 0, res
         | 
| 2792 2795 | 
             
              end
         | 
| 2793 2796 |  | 
| 2794 | 
            -
              it  | 
| 2797 | 
            +
              it 'has a working function #uint64_out' do
         | 
| 2795 2798 | 
             
                res = GIMarshallingTests.uint64_out
         | 
| 2796 2799 | 
             
                assert_equal 0xffff_ffff_ffff_ffff, res
         | 
| 2797 2800 | 
             
              end
         | 
| 2798 2801 |  | 
| 2799 | 
            -
              it  | 
| 2802 | 
            +
              it 'has a working function #uint64_return' do
         | 
| 2800 2803 | 
             
                res = GIMarshallingTests.uint64_return
         | 
| 2801 2804 | 
             
                assert_equal 0xffff_ffff_ffff_ffff, res
         | 
| 2802 2805 | 
             
              end
         | 
| 2803 2806 |  | 
| 2804 | 
            -
              it  | 
| 2807 | 
            +
              it 'has a working function #uint8_in' do
         | 
| 2805 2808 | 
             
                GIMarshallingTests.uint8_in 0xff
         | 
| 2806 2809 | 
             
              end
         | 
| 2807 2810 |  | 
| 2808 | 
            -
              it  | 
| 2811 | 
            +
              it 'has a working function #uint8_inout' do
         | 
| 2809 2812 | 
             
                res = GIMarshallingTests.uint8_inout 0xff
         | 
| 2810 2813 | 
             
                assert_equal 0, res
         | 
| 2811 2814 | 
             
              end
         | 
| 2812 2815 |  | 
| 2813 | 
            -
              it  | 
| 2816 | 
            +
              it 'has a working function #uint8_out' do
         | 
| 2814 2817 | 
             
                res = GIMarshallingTests.uint8_out
         | 
| 2815 2818 | 
             
                assert_equal 0xff, res
         | 
| 2816 2819 | 
             
              end
         | 
| 2817 2820 |  | 
| 2818 | 
            -
              it  | 
| 2821 | 
            +
              it 'has a working function #uint8_return' do
         | 
| 2819 2822 | 
             
                res = GIMarshallingTests.uint8_return
         | 
| 2820 2823 | 
             
                assert_equal 0xff, res
         | 
| 2821 2824 | 
             
              end
         | 
| 2822 2825 |  | 
| 2823 | 
            -
              it  | 
| 2826 | 
            +
              it 'has a working function #uint_in' do
         | 
| 2824 2827 | 
             
                GIMarshallingTests.uint_in max_uint
         | 
| 2825 2828 | 
             
                pass
         | 
| 2826 2829 | 
             
              end
         | 
| 2827 2830 |  | 
| 2828 | 
            -
              it  | 
| 2831 | 
            +
              it 'has a working function #uint_inout' do
         | 
| 2829 2832 | 
             
                res = GIMarshallingTests.uint_inout max_uint
         | 
| 2830 2833 | 
             
                assert_equal 0, res
         | 
| 2831 2834 | 
             
              end
         | 
| 2832 2835 |  | 
| 2833 | 
            -
              it  | 
| 2836 | 
            +
              it 'has a working function #uint_out' do
         | 
| 2834 2837 | 
             
                res = GIMarshallingTests.uint_out
         | 
| 2835 2838 | 
             
                assert_equal max_uint, res
         | 
| 2836 2839 | 
             
              end
         | 
| 2837 2840 |  | 
| 2838 | 
            -
              it  | 
| 2841 | 
            +
              it 'has a working function #uint_return' do
         | 
| 2839 2842 | 
             
                res = GIMarshallingTests.uint_return
         | 
| 2840 2843 | 
             
                assert_equal max_uint, res
         | 
| 2841 2844 | 
             
              end
         | 
| 2842 2845 |  | 
| 2843 | 
            -
              it  | 
| 2846 | 
            +
              it 'has a working function #ulong_in' do
         | 
| 2844 2847 | 
             
                GIMarshallingTests.ulong_in max_ulong
         | 
| 2845 2848 | 
             
              end
         | 
| 2846 2849 |  | 
| 2847 | 
            -
              it  | 
| 2850 | 
            +
              it 'has a working function #ulong_inout' do
         | 
| 2848 2851 | 
             
                res = GIMarshallingTests.ulong_inout max_ulong
         | 
| 2849 2852 | 
             
                assert_equal 0, res
         | 
| 2850 2853 | 
             
              end
         | 
| 2851 2854 |  | 
| 2852 | 
            -
              it  | 
| 2855 | 
            +
              it 'has a working function #ulong_out' do
         | 
| 2853 2856 | 
             
                res = GIMarshallingTests.ulong_out
         | 
| 2854 2857 | 
             
                assert_equal max_ulong, res
         | 
| 2855 2858 | 
             
              end
         | 
| 2856 2859 |  | 
| 2857 | 
            -
              it  | 
| 2860 | 
            +
              it 'has a working function #ulong_return' do
         | 
| 2858 2861 | 
             
                res = GIMarshallingTests.ulong_return
         | 
| 2859 2862 | 
             
                assert_equal max_ulong, res
         | 
| 2860 2863 | 
             
              end
         | 
| 2861 2864 |  | 
| 2862 | 
            -
              it  | 
| 2863 | 
            -
                skip  | 
| 2865 | 
            +
              it 'has a working function #union_inout' do
         | 
| 2866 | 
            +
                skip 'This function is defined in the header but not implemented'
         | 
| 2864 2867 | 
             
              end
         | 
| 2865 2868 |  | 
| 2866 | 
            -
              it  | 
| 2867 | 
            -
                skip  | 
| 2869 | 
            +
              it 'has a working function #union_out' do
         | 
| 2870 | 
            +
                skip 'This function is defined in the header but not implemented'
         | 
| 2868 2871 | 
             
              end
         | 
| 2869 2872 |  | 
| 2870 | 
            -
              it  | 
| 2873 | 
            +
              it 'has a working function #union_returnv' do
         | 
| 2871 2874 | 
             
                res = GIMarshallingTests.union_returnv
         | 
| 2872 2875 | 
             
                assert_instance_of GIMarshallingTests::Union, res
         | 
| 2873 2876 | 
             
                assert_equal 42, res.long_
         | 
| 2874 2877 | 
             
              end
         | 
| 2875 2878 |  | 
| 2876 | 
            -
              it  | 
| 2879 | 
            +
              it 'has a working function #ushort_in' do
         | 
| 2877 2880 | 
             
                GIMarshallingTests.ushort_in max_ushort
         | 
| 2878 2881 | 
             
                pass
         | 
| 2879 2882 | 
             
              end
         | 
| 2880 2883 |  | 
| 2881 | 
            -
              it  | 
| 2884 | 
            +
              it 'has a working function #ushort_inout' do
         | 
| 2882 2885 | 
             
                res = GIMarshallingTests.ushort_inout max_ushort
         | 
| 2883 2886 | 
             
                assert_equal 0, res
         | 
| 2884 2887 | 
             
              end
         | 
| 2885 2888 |  | 
| 2886 | 
            -
              it  | 
| 2889 | 
            +
              it 'has a working function #ushort_out' do
         | 
| 2887 2890 | 
             
                res = GIMarshallingTests.ushort_out
         | 
| 2888 2891 | 
             
                assert_equal max_ushort, res
         | 
| 2889 2892 | 
             
              end
         | 
| 2890 2893 |  | 
| 2891 | 
            -
              it  | 
| 2894 | 
            +
              it 'has a working function #ushort_return' do
         | 
| 2892 2895 | 
             
                res = GIMarshallingTests.ushort_return
         | 
| 2893 2896 | 
             
                assert_equal max_ushort, res
         | 
| 2894 2897 | 
             
              end
         | 
| 2895 2898 |  | 
| 2896 | 
            -
              it  | 
| 2899 | 
            +
              it 'has a working function #utf8_as_uint8array_in' do
         | 
| 2897 2900 | 
             
                skip unless get_introspection_data 'GIMarshallingTests', 'utf8_as_uint8array_in'
         | 
| 2898 2901 | 
             
                GIMarshallingTests.utf8_as_uint8array_in GIMarshallingTests::CONSTANT_UTF8.bytes.to_a
         | 
| 2899 2902 | 
             
                pass
         | 
| 2900 2903 | 
             
              end
         | 
| 2901 2904 |  | 
| 2902 | 
            -
              it  | 
| 2905 | 
            +
              it 'has a working function #utf8_dangling_out' do
         | 
| 2903 2906 | 
             
                res = GIMarshallingTests.utf8_dangling_out
         | 
| 2904 2907 | 
             
                assert_nil res
         | 
| 2905 2908 | 
             
              end
         | 
| 2906 2909 |  | 
| 2907 | 
            -
              it  | 
| 2908 | 
            -
                skip  | 
| 2910 | 
            +
              it 'has a working function #utf8_full_in' do
         | 
| 2911 | 
            +
                skip 'This function is defined in the header but not implemented'
         | 
| 2909 2912 | 
             
              end
         | 
| 2910 2913 |  | 
| 2911 | 
            -
             | 
| 2912 | 
            -
             | 
| 2913 | 
            -
                 | 
| 2914 | 
            -
                assert_equal "", res
         | 
| 2914 | 
            +
              it 'has a working function #utf8_full_inout' do
         | 
| 2915 | 
            +
                res = GIMarshallingTests.utf8_full_inout 'const ♥ utf8'
         | 
| 2916 | 
            +
                assert_equal '', res
         | 
| 2915 2917 | 
             
              end
         | 
| 2916 2918 |  | 
| 2917 | 
            -
              it  | 
| 2919 | 
            +
              it 'has a working function #utf8_full_out' do
         | 
| 2918 2920 | 
             
                res = GIMarshallingTests.utf8_full_out
         | 
| 2919 | 
            -
                assert_equal  | 
| 2921 | 
            +
                assert_equal 'const ♥ utf8', res
         | 
| 2920 2922 | 
             
              end
         | 
| 2921 2923 |  | 
| 2922 | 
            -
              it  | 
| 2924 | 
            +
              it 'has a working function #utf8_full_return' do
         | 
| 2923 2925 | 
             
                res = GIMarshallingTests.utf8_full_return
         | 
| 2924 | 
            -
                assert_equal  | 
| 2926 | 
            +
                assert_equal 'const ♥ utf8', res
         | 
| 2925 2927 | 
             
              end
         | 
| 2926 2928 |  | 
| 2927 | 
            -
              it  | 
| 2928 | 
            -
                GIMarshallingTests.utf8_none_in  | 
| 2929 | 
            +
              it 'has a working function #utf8_none_in' do
         | 
| 2930 | 
            +
                GIMarshallingTests.utf8_none_in 'const ♥ utf8'
         | 
| 2929 2931 | 
             
                pass
         | 
| 2930 2932 | 
             
              end
         | 
| 2931 2933 |  | 
| 2932 | 
            -
              it  | 
| 2933 | 
            -
                res = GIMarshallingTests.utf8_none_inout  | 
| 2934 | 
            -
                assert_equal  | 
| 2934 | 
            +
              it 'has a working function #utf8_none_inout' do
         | 
| 2935 | 
            +
                res = GIMarshallingTests.utf8_none_inout 'const ♥ utf8'
         | 
| 2936 | 
            +
                assert_equal '', res
         | 
| 2935 2937 | 
             
              end
         | 
| 2936 2938 |  | 
| 2937 | 
            -
              it  | 
| 2939 | 
            +
              it 'has a working function #utf8_none_out' do
         | 
| 2938 2940 | 
             
                res = GIMarshallingTests.utf8_none_out
         | 
| 2939 | 
            -
                assert_equal  | 
| 2941 | 
            +
                assert_equal 'const ♥ utf8', res
         | 
| 2940 2942 | 
             
              end
         | 
| 2941 2943 |  | 
| 2942 | 
            -
              it  | 
| 2944 | 
            +
              it 'has a working function #utf8_none_return' do
         | 
| 2943 2945 | 
             
                res = GIMarshallingTests.utf8_none_return
         | 
| 2944 | 
            -
                assert_equal  | 
| 2946 | 
            +
                assert_equal 'const ♥ utf8', res
         | 
| 2945 2947 | 
             
              end
         | 
| 2946 2948 | 
             
            end
         |