Sha256: 78a1045b7e1635c5399ff228e2cbe4ca8ca4584e77e364d7d45c3beca30b38b1

Contents?: true

Size: 769 Bytes

Versions: 12

Compression:

Stored size: 769 Bytes

Contents

require 'gir_ffi_test_helper'

require 'gir_ffi/g_type'

describe GirFFI::GType do
  let(:gobject_gtype) { GObject::Object.gtype }
  let(:gobject_type_query) { GObject.type_query gobject_gtype }

  describe '#to_i' do
    it 'returns the integer gtype' do
      gt = GirFFI::GType.new(gobject_gtype)
      gt.to_i.must_equal gobject_gtype
    end
  end

  describe '#class_size' do
    it 'returns the class size for object types' do
      gt = GirFFI::GType.new(gobject_gtype)
      gt.class_size.must_equal gobject_type_query.class_size
    end
  end

  describe '#instance_size' do
    it 'returns the instance size for object types' do
      gt = GirFFI::GType.new(gobject_gtype)
      gt.instance_size.must_equal gobject_type_query.instance_size
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gir_ffi-0.9.2 test/gir_ffi/g_type_test.rb
gir_ffi-0.9.1 test/gir_ffi/g_type_test.rb
gir_ffi-0.9.0 test/gir_ffi/g_type_test.rb
gir_ffi-0.8.6 test/gir_ffi/g_type_test.rb
gir_ffi-0.8.5 test/gir_ffi/g_type_test.rb
gir_ffi-0.8.4 test/gir_ffi/g_type_test.rb
gir_ffi-0.8.3 test/gir_ffi/g_type_test.rb
gir_ffi-0.8.2 test/gir_ffi/g_type_test.rb
gir_ffi-0.8.1 test/gir_ffi/g_type_test.rb
gir_ffi-0.8.0 test/gir_ffi/g_type_test.rb
gir_ffi-0.7.10 test/gir_ffi/g_type_test.rb
gir_ffi-0.7.9 test/gir_ffi/g_type_test.rb