Sha256: c3cd3de442b4a031b9dbbebd65badd3ec80ee8be57f0d47c20adcd2ba8afdb6a

Contents?: true

Size: 1.28 KB

Versions: 4

Compression:

Stored size: 1.28 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

4 entries across 4 versions & 1 rubygems

Version Path
gir_ffi-0.15.3 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.15.2 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.15.1 test/ffi-gobject_introspection/i_property_info_test.rb
gir_ffi-0.15.0 test/ffi-gobject_introspection/i_property_info_test.rb