Sha256: 42b078fabbfc426a7cc45064504f34894d5bfb99a1374ff5a16231b065cce3eb

Contents?: true

Size: 1.16 KB

Versions: 9

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true
require 'gir_ffi_test_helper'
require 'gir_ffi/error_type_info'

describe GirFFI::ErrorTypeInfo do
  let(:instance) { GirFFI::ErrorTypeInfo.new }

  describe '#array_length' do
    it 'returns the correct value' do
      instance.array_length.must_equal(-1)
    end
  end

  describe '#tag_or_class' do
    it 'returns the correct value' do
      instance.tag_or_class.must_equal [:pointer, :error]
    end
  end

  describe '#pointer?' do
    it 'returns the correct value' do
      instance.pointer?.must_equal true
    end
  end

  describe '#flattened_tag' do
    it 'returns the correct value' do
      instance.flattened_tag.must_equal :error
    end
  end

  describe '#extra_conversion_arguments' do
    it 'returns the correct value' do
      instance.extra_conversion_arguments.must_equal []
    end
  end

  describe '#argument_class_name' do
    it 'returns the correct value' do
      instance.argument_class_name.must_equal 'GLib::Error'
    end
  end

  describe '#needs_ruby_to_c_conversion_for_callbacks?' do
    it 'returns the correct value' do
      instance.needs_ruby_to_c_conversion_for_callbacks?.must_equal true
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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