gir_ffi 0.8.6 → 0.9.0

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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +18 -0
  3. data/README.md +3 -4
  4. data/lib/ffi-glib.rb +1 -0
  5. data/lib/ffi-glib/container_class_methods.rb +12 -0
  6. data/lib/ffi-glib/destroy_notify.rb +15 -0
  7. data/lib/ffi-glib/main_loop.rb +23 -4
  8. data/lib/ffi-gobject.rb +4 -2
  9. data/lib/ffi-gobject/object.rb +31 -16
  10. data/lib/ffi-gobject/object_class.rb +4 -0
  11. data/lib/ffi-gobject/value.rb +3 -3
  12. data/lib/ffi-gobject_introspection/i_flags_info.rb +0 -1
  13. data/lib/gir_ffi-base/gobject/lib.rb +10 -0
  14. data/lib/gir_ffi/arg_helper.rb +1 -22
  15. data/lib/gir_ffi/boxed_base.rb +1 -0
  16. data/lib/gir_ffi/builder.rb +7 -1
  17. data/lib/gir_ffi/builders/argument_builder.rb +21 -9
  18. data/lib/gir_ffi/builders/argument_builder_collection.rb +28 -9
  19. data/lib/gir_ffi/builders/base_argument_builder.rb +36 -12
  20. data/lib/gir_ffi/builders/base_method_builder.rb +1 -1
  21. data/lib/gir_ffi/builders/callback_argument_builder.rb +4 -0
  22. data/lib/gir_ffi/builders/closure_to_pointer_convertor.rb +3 -2
  23. data/lib/gir_ffi/builders/constructor_builder.rb +1 -1
  24. data/lib/gir_ffi/builders/enum_builder.rb +4 -4
  25. data/lib/gir_ffi/builders/error_argument_builder.rb +4 -0
  26. data/lib/gir_ffi/builders/field_builder.rb +23 -9
  27. data/lib/gir_ffi/builders/flags_builder.rb +28 -0
  28. data/lib/gir_ffi/builders/full_c_to_ruby_convertor.rb +18 -0
  29. data/lib/gir_ffi/builders/module_builder.rb +1 -0
  30. data/lib/gir_ffi/builders/null_argument_builder.rb +9 -1
  31. data/lib/gir_ffi/builders/object_builder.rb +7 -4
  32. data/lib/gir_ffi/builders/property_builder.rb +2 -2
  33. data/lib/gir_ffi/builders/return_value_builder.rb +4 -4
  34. data/lib/gir_ffi/builders/struct_builder.rb +10 -2
  35. data/lib/gir_ffi/builders/type_builder.rb +12 -9
  36. data/lib/gir_ffi/builders/unintrospectable_boxed_builder.rb +26 -0
  37. data/lib/gir_ffi/builders/user_defined_builder.rb +2 -2
  38. data/lib/gir_ffi/builders/with_layout.rb +1 -1
  39. data/lib/gir_ffi/callback_base.rb +13 -5
  40. data/lib/gir_ffi/core.rb +1 -0
  41. data/lib/gir_ffi/error_argument_info.rb +4 -0
  42. data/lib/gir_ffi/flags_base.rb +63 -0
  43. data/lib/gir_ffi/in_pointer.rb +1 -3
  44. data/lib/gir_ffi/info_ext/i_type_info.rb +6 -0
  45. data/lib/gir_ffi/object_base.rb +9 -1
  46. data/lib/gir_ffi/object_store.rb +26 -0
  47. data/lib/gir_ffi/unintrospectable_boxed_info.rb +31 -0
  48. data/lib/gir_ffi/unintrospectable_type_info.rb +5 -0
  49. data/lib/gir_ffi/user_defined_type_info.rb +19 -0
  50. data/lib/gir_ffi/version.rb +1 -1
  51. data/test/ffi-glib/destroy_notify_test.rb +13 -0
  52. data/test/ffi-glib/main_loop_test.rb +3 -3
  53. data/test/ffi-gobject/object_class_test.rb +8 -0
  54. data/test/ffi-gobject/object_test.rb +23 -5
  55. data/test/ffi-gobject/value_test.rb +19 -5
  56. data/test/ffi-gobject_test.rb +2 -2
  57. data/test/gir_ffi/builders/argument_builder_test.rb +12 -2
  58. data/test/gir_ffi/builders/constructor_builder_test.rb +4 -4
  59. data/test/gir_ffi/builders/function_builder_test.rb +46 -3
  60. data/test/gir_ffi/builders/object_builder_test.rb +25 -0
  61. data/test/gir_ffi/builders/property_builder_test.rb +4 -4
  62. data/test/gir_ffi/builders/struct_builder_test.rb +15 -13
  63. data/test/gir_ffi/builders/unintrospectable_boxed_builder_test.rb +33 -0
  64. data/test/gir_ffi/builders/unintrospectable_builder_test.rb +6 -0
  65. data/test/gir_ffi/builders/user_defined_builder_test.rb +7 -1
  66. data/test/gir_ffi/callback_base_test.rb +12 -2
  67. data/test/gir_ffi/object_base_test.rb +14 -0
  68. data/test/integration/callback_exceptions_test.rb +61 -0
  69. data/test/integration/generated_gimarshallingtests_test.rb +70 -70
  70. data/test/integration/generated_gio_test.rb +1 -1
  71. data/test/integration/generated_gobject_test.rb +1 -1
  72. data/test/integration/generated_gtop_test.rb +5 -1
  73. data/test/integration/generated_regress_test.rb +83 -102
  74. data/test/integration/generated_warnlib_test.rb +2 -2
  75. metadata +42 -4
@@ -139,7 +139,7 @@ describe GIMarshallingTests do
139
139
  end
140
140
 
141
141
  it 'has a working function #in' do
142
- GIMarshallingTests::Flags.in :value2
142
+ GIMarshallingTests::Flags.in value2: true
143
143
  end
144
144
 
145
145
  it 'has a working function #in_zero' do
@@ -147,18 +147,18 @@ describe GIMarshallingTests do
147
147
  end
148
148
 
149
149
  it 'has a working function #inout' do
150
- result = GIMarshallingTests::Flags.inout :value2
151
- result.must_equal :value1
150
+ result = GIMarshallingTests::Flags.inout value2: true
151
+ result.must_equal(value1: true)
152
152
  end
153
153
 
154
154
  it 'has a working function #out' do
155
155
  result = GIMarshallingTests::Flags.out
156
- result.must_equal :value2
156
+ result.must_equal(value2: true)
157
157
  end
158
158
 
159
159
  it 'has a working function #returnv' do
160
160
  result = GIMarshallingTests::Flags.returnv
161
- result.must_equal :value2
161
+ result.must_equal(value2: true)
162
162
  end
163
163
  end
164
164
 
@@ -587,7 +587,7 @@ describe GIMarshallingTests do
587
587
  }
588
588
  end
589
589
  result = derived_instance.vfunc_caller_allocated_out_parameter
590
- result.get_value.must_equal 'Hello!'
590
+ result.must_equal 'Hello!'
591
591
  end
592
592
 
593
593
  it 'has a working method #vfunc_meth_with_error' do
@@ -686,7 +686,7 @@ describe GIMarshallingTests do
686
686
  }
687
687
  end
688
688
 
689
- derived_instance.vfunc_with_callback proc { |val, user_data| result = val + user_data }, 23
689
+ derived_instance.vfunc_with_callback { |val, user_data| result = val + user_data }
690
690
 
691
691
  # The current implementation of the vfunc_with_callback method currently
692
692
  # doesn't actually call the virtual function vfunc_with_callback.
@@ -696,14 +696,14 @@ describe GIMarshallingTests do
696
696
 
697
697
  describe "its 'int' property" do
698
698
  it 'can be retrieved with #get_property' do
699
- assert_equal 42, instance.get_property('int').get_value
699
+ assert_equal 42, instance.get_property('int')
700
700
  end
701
701
  it 'can be retrieved with #int' do
702
702
  assert_equal 42, instance.int
703
703
  end
704
704
  it 'can be set with #set_property' do
705
705
  instance.set_property('int', 13)
706
- assert_equal 13, instance.get_property('int').get_value
706
+ assert_equal 13, instance.get_property('int')
707
707
  end
708
708
  it 'can be set with #int=' do
709
709
  instance.int = 1
@@ -797,7 +797,7 @@ describe GIMarshallingTests do
797
797
 
798
798
  describe "its 'some-boolean' property" do
799
799
  it 'can be retrieved with #get_property' do
800
- instance.get_property('some-boolean').get_value.must_equal false
800
+ instance.get_property('some-boolean').must_equal false
801
801
  end
802
802
 
803
803
  it 'can be retrieved with #some_boolean' do
@@ -806,12 +806,12 @@ describe GIMarshallingTests do
806
806
 
807
807
  it 'can be set with #set_property' do
808
808
  instance.set_property('some-boolean', true)
809
- instance.get_property('some-boolean').get_value.must_equal true
809
+ instance.get_property('some-boolean').must_equal true
810
810
  end
811
811
 
812
812
  it 'can be set with #some_boolean=' do
813
813
  instance.some_boolean = true
814
- instance.get_property('some-boolean').get_value.must_equal true
814
+ instance.get_property('some-boolean').must_equal true
815
815
  end
816
816
  end
817
817
 
@@ -823,7 +823,7 @@ describe GIMarshallingTests do
823
823
  end
824
824
 
825
825
  it 'can be retrieved with #get_property' do
826
- instance.get_property('some-boxed-glist').get_value.must_equal nil
826
+ instance.get_property('some-boxed-glist').must_equal nil
827
827
  end
828
828
 
829
829
  it 'can be retrieved with #some_boxed_glist' do
@@ -850,7 +850,7 @@ describe GIMarshallingTests do
850
850
  end
851
851
 
852
852
  it 'can be retrieved with #get_property' do
853
- instance.get_property('some-boxed-struct').get_value.must_equal nil
853
+ instance.get_property('some-boxed-struct').must_equal nil
854
854
  end
855
855
 
856
856
  it 'can be retrieved with #some_boxed_struct' do
@@ -861,7 +861,7 @@ describe GIMarshallingTests do
861
861
  boxed = GIMarshallingTests::BoxedStruct.new
862
862
  boxed.long_ = 42
863
863
  instance.set_property('some-boxed-struct', boxed)
864
- instance.get_property('some-boxed-struct').get_value.long_.must_equal 42
864
+ instance.get_property('some-boxed-struct').long_.must_equal 42
865
865
  end
866
866
 
867
867
  it 'can be set with #some_boxed_struct=' do
@@ -874,7 +874,7 @@ describe GIMarshallingTests do
874
874
 
875
875
  describe "its 'some-char' property" do
876
876
  it 'can be retrieved with #get_property' do
877
- instance.get_property('some-char').get_value.must_equal 0
877
+ instance.get_property('some-char').must_equal 0
878
878
  end
879
879
 
880
880
  it 'can be retrieved with #some_char' do
@@ -883,7 +883,7 @@ describe GIMarshallingTests do
883
883
 
884
884
  it 'can be set with #set_property' do
885
885
  instance.set_property 'some-char', 42
886
- instance.get_property('some-char').get_value.must_equal 42
886
+ instance.get_property('some-char').must_equal 42
887
887
  end
888
888
 
889
889
  it 'can be set with #some_char=' do
@@ -894,7 +894,7 @@ describe GIMarshallingTests do
894
894
 
895
895
  describe "its 'some-double' property" do
896
896
  it 'can be retrieved with #get_property' do
897
- instance.get_property('some-double').get_value.must_equal 0.0
897
+ instance.get_property('some-double').must_equal 0.0
898
898
  end
899
899
 
900
900
  it 'can be retrieved with #some_double' do
@@ -903,7 +903,7 @@ describe GIMarshallingTests do
903
903
 
904
904
  it 'can be set with #set_property' do
905
905
  instance.set_property('some-double', 3.14)
906
- instance.get_property('some-double').get_value.must_equal 3.14
906
+ instance.get_property('some-double').must_equal 3.14
907
907
  end
908
908
 
909
909
  it 'can be set with #some_double=' do
@@ -914,7 +914,7 @@ describe GIMarshallingTests do
914
914
 
915
915
  describe "its 'some-float' property" do
916
916
  it 'can be retrieved with #get_property' do
917
- instance.get_property('some-float').get_value.must_equal 0.0
917
+ instance.get_property('some-float').must_equal 0.0
918
918
  end
919
919
 
920
920
  it 'can be retrieved with #some_float' do
@@ -923,7 +923,7 @@ describe GIMarshallingTests do
923
923
 
924
924
  it 'can be set with #set_property' do
925
925
  instance.set_property('some-float', 3.14)
926
- instance.get_property('some-float').get_value.must_be_close_to 3.14
926
+ instance.get_property('some-float').must_be_close_to 3.14
927
927
  end
928
928
 
929
929
  it 'can be set with #some_float=' do
@@ -934,7 +934,7 @@ describe GIMarshallingTests do
934
934
 
935
935
  describe "its 'some-int' property" do
936
936
  it 'can be retrieved with #get_property' do
937
- instance.get_property('some-int').get_value.must_equal 0
937
+ instance.get_property('some-int').must_equal 0
938
938
  end
939
939
 
940
940
  it 'can be retrieved with #some_int' do
@@ -943,7 +943,7 @@ describe GIMarshallingTests do
943
943
 
944
944
  it 'can be set with #set_property' do
945
945
  instance.set_property 'some-int', 4242
946
- instance.get_property('some-int').get_value.must_equal 4242
946
+ instance.get_property('some-int').must_equal 4242
947
947
  end
948
948
 
949
949
  it 'can be set with #some_int=' do
@@ -954,7 +954,7 @@ describe GIMarshallingTests do
954
954
 
955
955
  describe "its 'some-int64' property" do
956
956
  it 'can be retrieved with #get_property' do
957
- instance.get_property('some-int64').get_value.must_equal 0
957
+ instance.get_property('some-int64').must_equal 0
958
958
  end
959
959
 
960
960
  it 'can be retrieved with #some_int64' do
@@ -963,7 +963,7 @@ describe GIMarshallingTests do
963
963
 
964
964
  it 'can be set with #set_property' do
965
965
  instance.set_property 'some-int64', 42_000_000_000_000
966
- instance.get_property('some-int64').get_value.must_equal 42_000_000_000_000
966
+ instance.get_property('some-int64').must_equal 42_000_000_000_000
967
967
  end
968
968
 
969
969
  it 'can be set with #some_int64=' do
@@ -974,7 +974,7 @@ describe GIMarshallingTests do
974
974
 
975
975
  describe "its 'some-long' property" do
976
976
  it 'can be retrieved with #get_property' do
977
- instance.get_property('some-long').get_value.must_equal 0
977
+ instance.get_property('some-long').must_equal 0
978
978
  end
979
979
 
980
980
  it 'can be retrieved with #some_long' do
@@ -983,7 +983,7 @@ describe GIMarshallingTests do
983
983
 
984
984
  it 'can be set with #set_property' do
985
985
  instance.set_property 'some-long', 4242
986
- instance.get_property('some-long').get_value.must_equal 4242
986
+ instance.get_property('some-long').must_equal 4242
987
987
  end
988
988
 
989
989
  it 'can be set with #some_long=' do
@@ -1000,7 +1000,7 @@ describe GIMarshallingTests do
1000
1000
  end
1001
1001
 
1002
1002
  it 'can be retrieved with #get_property' do
1003
- instance.get_property('some-object').get_value.must_be_nil
1003
+ instance.get_property('some-object').must_be_nil
1004
1004
  end
1005
1005
 
1006
1006
  it 'can be retrieved with #some_object' do
@@ -1010,7 +1010,7 @@ describe GIMarshallingTests do
1010
1010
  it 'can be set with #set_property' do
1011
1011
  ob = GIMarshallingTests::Object.new 42
1012
1012
  instance.set_property 'some-object', ob
1013
- instance.get_property('some-object').get_value.must_equal ob
1013
+ instance.get_property('some-object').must_equal ob
1014
1014
  end
1015
1015
 
1016
1016
  it 'can be set with #some_object=' do
@@ -1028,7 +1028,7 @@ describe GIMarshallingTests do
1028
1028
  end
1029
1029
 
1030
1030
  it 'can be retrieved with #get_property' do
1031
- instance.get_property('some-strv').get_value.must_be :==, []
1031
+ instance.get_property('some-strv').must_be :==, []
1032
1032
  end
1033
1033
 
1034
1034
  it 'can be retrieved with #some_strv' do
@@ -1037,7 +1037,7 @@ describe GIMarshallingTests do
1037
1037
 
1038
1038
  it 'can be set with #set_property_extended' do
1039
1039
  instance.set_property_extended('some-strv', %w(foo bar))
1040
- instance.get_property('some-strv').get_value.must_be :==, %w(foo bar)
1040
+ instance.get_property('some-strv').must_be :==, %w(foo bar)
1041
1041
  end
1042
1042
 
1043
1043
  it 'can be set with #some_strv=' do
@@ -1048,7 +1048,7 @@ describe GIMarshallingTests do
1048
1048
 
1049
1049
  describe "its 'some-uchar' property" do
1050
1050
  it 'can be retrieved with #get_property' do
1051
- instance.get_property('some-uchar').get_value.must_equal 0
1051
+ instance.get_property('some-uchar').must_equal 0
1052
1052
  end
1053
1053
 
1054
1054
  it 'can be retrieved with #some_uchar' do
@@ -1057,7 +1057,7 @@ describe GIMarshallingTests do
1057
1057
 
1058
1058
  it 'can be set with #set_property' do
1059
1059
  instance.set_property 'some-uchar', 42
1060
- instance.get_property('some-uchar').get_value.must_equal 42
1060
+ instance.get_property('some-uchar').must_equal 42
1061
1061
  end
1062
1062
 
1063
1063
  it 'can be set with #some_uchar=' do
@@ -1068,7 +1068,7 @@ describe GIMarshallingTests do
1068
1068
 
1069
1069
  describe "its 'some-uint' property" do
1070
1070
  it 'can be retrieved with #get_property' do
1071
- instance.get_property('some-uint').get_value.must_equal 0
1071
+ instance.get_property('some-uint').must_equal 0
1072
1072
  end
1073
1073
 
1074
1074
  it 'can be retrieved with #some_uint' do
@@ -1077,7 +1077,7 @@ describe GIMarshallingTests do
1077
1077
 
1078
1078
  it 'can be set with #set_property' do
1079
1079
  instance.set_property 'some-uint', 4242
1080
- instance.get_property('some-uint').get_value.must_equal 4242
1080
+ instance.get_property('some-uint').must_equal 4242
1081
1081
  end
1082
1082
 
1083
1083
  it 'can be set with #some_uint=' do
@@ -1088,7 +1088,7 @@ describe GIMarshallingTests do
1088
1088
 
1089
1089
  describe "its 'some-uint64' property" do
1090
1090
  it 'can be retrieved with #get_property' do
1091
- instance.get_property('some-uint64').get_value.must_equal 0
1091
+ instance.get_property('some-uint64').must_equal 0
1092
1092
  end
1093
1093
 
1094
1094
  it 'can be retrieved with #some_uint64' do
@@ -1097,7 +1097,7 @@ describe GIMarshallingTests do
1097
1097
 
1098
1098
  it 'can be set with #set_property' do
1099
1099
  instance.set_property 'some-uint64', 42_000_000_000_000
1100
- instance.get_property('some-uint64').get_value.must_equal 42_000_000_000_000
1100
+ instance.get_property('some-uint64').must_equal 42_000_000_000_000
1101
1101
  end
1102
1102
 
1103
1103
  it 'can be set with #some_uint64=' do
@@ -1108,7 +1108,7 @@ describe GIMarshallingTests do
1108
1108
 
1109
1109
  describe "its 'some-ulong' property" do
1110
1110
  it 'can be retrieved with #get_property' do
1111
- instance.get_property('some-ulong').get_value.must_equal 0
1111
+ instance.get_property('some-ulong').must_equal 0
1112
1112
  end
1113
1113
 
1114
1114
  it 'can be retrieved with #some_ulong' do
@@ -1117,7 +1117,7 @@ describe GIMarshallingTests do
1117
1117
 
1118
1118
  it 'can be set with #set_property' do
1119
1119
  instance.set_property 'some-ulong', 4242
1120
- instance.get_property('some-ulong').get_value.must_equal 4242
1120
+ instance.get_property('some-ulong').must_equal 4242
1121
1121
  end
1122
1122
 
1123
1123
  it 'can be set with #some_ulong=' do
@@ -1134,7 +1134,7 @@ describe GIMarshallingTests do
1134
1134
  end
1135
1135
 
1136
1136
  it 'can be retrieved with #get_property' do
1137
- instance.get_property('some-variant').get_value.must_be_nil
1137
+ instance.get_property('some-variant').must_be_nil
1138
1138
  end
1139
1139
 
1140
1140
  it 'can be retrieved with #some_variant' do
@@ -1144,7 +1144,7 @@ describe GIMarshallingTests do
1144
1144
  it 'can be set with #set_property' do
1145
1145
  value = GLib::Variant.new_string('Foo')
1146
1146
  instance.set_property 'some-variant', value
1147
- instance.get_property('some-variant').get_value.must_equal value
1147
+ instance.get_property('some-variant').must_equal value
1148
1148
  end
1149
1149
 
1150
1150
  it 'can be set with #some_variant=' do
@@ -1577,14 +1577,14 @@ describe GIMarshallingTests do
1577
1577
  end
1578
1578
 
1579
1579
  it 'has a working function #callback_multiple_out_parameters' do
1580
- result = GIMarshallingTests.callback_multiple_out_parameters proc { |*_args|
1580
+ result = GIMarshallingTests.callback_multiple_out_parameters do |*_args|
1581
1581
  [12.0, 13.0]
1582
- }
1582
+ end
1583
1583
  result.must_equal [12.0, 13.0]
1584
1584
  end
1585
1585
 
1586
1586
  it 'has a working function #callback_one_out_parameter' do
1587
- result = GIMarshallingTests.callback_one_out_parameter proc { 42.0 }
1587
+ result = GIMarshallingTests.callback_one_out_parameter { 42.0 }
1588
1588
  result.must_equal 42.0
1589
1589
  end
1590
1590
 
@@ -1592,33 +1592,33 @@ describe GIMarshallingTests do
1592
1592
  skip unless get_introspection_data 'GIMarshallingTests', 'callback_owned_boxed'
1593
1593
  a = nil
1594
1594
 
1595
- callback = proc { |box, callback_data| a = box.long_ + callback_data }
1595
+ callback = proc { |box, _callback_data| a = box.long_ * 2 }
1596
1596
 
1597
- result = GIMarshallingTests.callback_owned_boxed callback, 42
1597
+ result = GIMarshallingTests.callback_owned_boxed(&callback)
1598
1598
  result.must_equal 1
1599
- a.must_equal 43
1599
+ a.must_equal 2
1600
1600
 
1601
- result = GIMarshallingTests.callback_owned_boxed callback, 42
1601
+ result = GIMarshallingTests.callback_owned_boxed(&callback)
1602
1602
  result.must_equal 2
1603
- a.must_equal 44
1603
+ a.must_equal 4
1604
1604
  end
1605
1605
 
1606
1606
  it 'has a working function #callback_return_value_and_multiple_out_parameters' do
1607
- result = GIMarshallingTests.callback_return_value_and_multiple_out_parameters proc { |*_args|
1607
+ result = GIMarshallingTests.callback_return_value_and_multiple_out_parameters do |*_args|
1608
1608
  [42, -142, 3]
1609
- }
1609
+ end
1610
1610
  result.must_equal [42, -142, 3]
1611
1611
  end
1612
1612
 
1613
1613
  it 'has a working function #callback_return_value_and_one_out_parameter' do
1614
- result = GIMarshallingTests.callback_return_value_and_one_out_parameter proc { |*_args|
1614
+ result = GIMarshallingTests.callback_return_value_and_one_out_parameter do |*_args|
1615
1615
  [42, -142]
1616
- }
1616
+ end
1617
1617
  result.must_equal [42, -142]
1618
1618
  end
1619
1619
 
1620
1620
  it 'has a working function #callback_return_value_only' do
1621
- result = GIMarshallingTests.callback_return_value_only proc { 42 }
1621
+ result = GIMarshallingTests.callback_return_value_only { 42 }
1622
1622
  result.must_equal 42
1623
1623
  end
1624
1624
 
@@ -1668,7 +1668,7 @@ describe GIMarshallingTests do
1668
1668
  end
1669
1669
 
1670
1670
  it 'has a working function #flags_in' do
1671
- GIMarshallingTests.flags_in :value2
1671
+ GIMarshallingTests.flags_in value2: true
1672
1672
  pass
1673
1673
  end
1674
1674
 
@@ -1678,18 +1678,18 @@ describe GIMarshallingTests do
1678
1678
  end
1679
1679
 
1680
1680
  it 'has a working function #flags_inout' do
1681
- res = GIMarshallingTests.flags_inout :value2
1682
- assert_equal :value1, res
1681
+ res = GIMarshallingTests.flags_inout value2: true
1682
+ res.must_equal(value1: true)
1683
1683
  end
1684
1684
 
1685
1685
  it 'has a working function #flags_out' do
1686
1686
  res = GIMarshallingTests.flags_out
1687
- assert_equal :value2, res
1687
+ res.must_equal(value2: true)
1688
1688
  end
1689
1689
 
1690
1690
  it 'has a working function #flags_returnv' do
1691
1691
  res = GIMarshallingTests.flags_returnv
1692
- assert_equal :value2, res
1692
+ res.must_equal(value2: true)
1693
1693
  end
1694
1694
 
1695
1695
  it 'has a working function #float_in' do
@@ -2238,10 +2238,10 @@ describe GIMarshallingTests do
2238
2238
 
2239
2239
  it 'has a working function #gvalue_inout' do
2240
2240
  res = GIMarshallingTests.gvalue_inout GObject::Value.wrap_ruby_value(42)
2241
- assert_equal '42', res.get_value
2241
+ assert_equal '42', res
2242
2242
 
2243
2243
  res = GIMarshallingTests.gvalue_inout 42
2244
- assert_equal '42', res.get_value
2244
+ assert_equal '42', res
2245
2245
  end
2246
2246
 
2247
2247
  it 'has a working function #gvalue_int64_in' do
@@ -2256,23 +2256,23 @@ describe GIMarshallingTests do
2256
2256
  it 'has a working function #gvalue_int64_out' do
2257
2257
  skip unless get_introspection_data 'GIMarshallingTests', 'gvalue_int64_out'
2258
2258
  gv = GIMarshallingTests.gvalue_int64_out
2259
- gv.get_value.must_equal 0x7fff_ffff_ffff_ffff
2259
+ gv.must_equal 0x7fff_ffff_ffff_ffff
2260
2260
  end
2261
2261
 
2262
2262
  it 'has a working function #gvalue_out' do
2263
2263
  res = GIMarshallingTests.gvalue_out
2264
- assert_equal 42, res.get_value
2264
+ assert_equal 42, res
2265
2265
  end
2266
2266
 
2267
2267
  it 'has a working function #gvalue_out_caller_allocates' do
2268
2268
  skip unless get_introspection_data 'GIMarshallingTests', 'gvalue_out_caller_allocates'
2269
2269
  res = GIMarshallingTests.gvalue_out_caller_allocates
2270
- res.get_value.must_equal 42
2270
+ res.must_equal 42
2271
2271
  end
2272
2272
 
2273
2273
  it 'has a working function #gvalue_return' do
2274
2274
  res = GIMarshallingTests.gvalue_return
2275
- assert_equal 42, res.get_value
2275
+ res.must_equal 42
2276
2276
  end
2277
2277
 
2278
2278
  it 'has a working function #init_function' do
@@ -2559,7 +2559,7 @@ describe GIMarshallingTests do
2559
2559
  end
2560
2560
 
2561
2561
  it 'has a working function #no_type_flags_in' do
2562
- GIMarshallingTests.no_type_flags_in :value2
2562
+ GIMarshallingTests.no_type_flags_in value2: true
2563
2563
  pass
2564
2564
  end
2565
2565
 
@@ -2569,18 +2569,18 @@ describe GIMarshallingTests do
2569
2569
  end
2570
2570
 
2571
2571
  it 'has a working function #no_type_flags_inout' do
2572
- res = GIMarshallingTests.no_type_flags_inout :value2
2573
- assert_equal :value1, res
2572
+ res = GIMarshallingTests.no_type_flags_inout value2: true
2573
+ res.must_equal(value1: true)
2574
2574
  end
2575
2575
 
2576
2576
  it 'has a working function #no_type_flags_out' do
2577
2577
  res = GIMarshallingTests.no_type_flags_out
2578
- assert_equal :value2, res
2578
+ res.must_equal(value2: true)
2579
2579
  end
2580
2580
 
2581
2581
  it 'has a working function #no_type_flags_returnv' do
2582
2582
  res = GIMarshallingTests.no_type_flags_returnv
2583
- assert_equal :value2, res
2583
+ res.must_equal(value2: true)
2584
2584
  end
2585
2585
 
2586
2586
  it 'has a working function #overrides_struct_returnv' do