Sha256: 267dac08239bf55db981a16a2fcd5aac73a1706645bd1ed0488213e10ef99916

Contents?: true

Size: 566 Bytes

Versions: 2

Compression:

Stored size: 566 Bytes

Contents

# frozen_string_literal: true
require 'gir_ffi_test_helper'

GirFFI.setup :GIMarshallingTests

describe GirFFI::UnionBase do
  it 'inherits from StructLikeBase' do
    GirFFI::StructBase.must_include GirFFI::StructLikeBase
  end

  describe 'new' do
    it 'creates an instance with an owned struct' do
      instance = GIMarshallingTests::Union.new
      instance.struct.must_be :owned?
    end

    it 'ensures the wrapped pointer is not autoreleased' do
      instance = GIMarshallingTests::Union.new
      instance.to_ptr.wont_be :autorelease?
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gir_ffi-0.11.1 test/gir_ffi/union_base_test.rb
gir_ffi-0.11.0 test/gir_ffi/union_base_test.rb