Sha256: 9dafc74301df9a77bb448f26fea50b34014d92492677341aba7c669a456dd300
Contents?: true
Size: 1 KB
Versions: 3
Compression:
Stored size: 1 KB
Contents
# frozen_string_literal: true require 'gir_ffi_test_helper' require 'gir_ffi/user_defined_property_info' describe GirFFI::UserDefinedPropertyInfo do let(:pspec) do GObject.param_spec_int('foo-bar', 'foo bar', 'Foo Bar', 1, 3, 2, readable: true, writable: true) end let(:container) { Object.new } let(:info) { GirFFI::UserDefinedPropertyInfo.new pspec, container, 24 } describe '#param_spec' do it 'returns the passed in parameter specification' do info.param_spec.must_equal pspec end end describe '#name' do it 'returns the accessor name from the parameter specification' do info.name.must_equal 'foo_bar' end end describe '#ffi_type' do it 'returns the ffi type corresponding to the type tag' do info.ffi_type.must_equal :int end end describe '#field_type.tag' do it 'returns the mapped type symbol' do info.field_type.tag.must_equal :gint end end end
Version data entries
3 entries across 3 versions & 1 rubygems