Sha256: ae5af3d9fe1dac57ccb4c4a0b16045a1b55ef22639d36442d94c7a13912d7f19

Contents?: true

Size: 1.26 KB

Versions: 9

Compression:

Stored size: 1.26 KB

Contents

# frozen_string_literal: true
require 'introspection_test_helper'

describe GObjectIntrospection::IPropertyInfo do
  describe "for Regress::TestObj's 'double' property" do
    let(:property_info) { get_property_introspection_data 'Regress', 'TestObj', 'double' }

    it 'returns :gdouble as its type' do
      property_info.property_type.tag.must_equal :gdouble
    end

    it 'flags the property as readable' do
      property_info.readable?.must_equal true
    end

    it 'flags the property as writeable' do
      property_info.writeable?.must_equal true
    end

    it 'flags the property as not construct-only' do
      property_info.construct_only?.must_equal false
    end
  end

  describe "for GObject::Binding's 'target-property' property" do
    let(:property_info) do
      get_property_introspection_data 'GObject', 'Binding', 'target-property'
    end

    it 'returns :utf8 as its type' do
      property_info.property_type.tag.must_equal :utf8
    end

    it 'flags the property as readable' do
      property_info.readable?.must_equal true
    end

    it 'flags the property as writeable' do
      property_info.writeable?.must_equal true
    end

    it 'flags the property as construct-only' do
      property_info.construct_only?.must_equal true
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-0.11.1 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.11.0 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.10.2 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.10.1 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.10.0 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.10.0.pre1 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.9.5 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.9.4 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.9.3 test/ffi-gobject_introspection/i_property_info_test.rb