Sha256: f3892fa0b61c04ba5a488654d80babbda7702ac04e8df4eced1a62324cfb313f

Contents?: true

Size: 498 Bytes

Versions: 9

Compression:

Stored size: 498 Bytes

Contents

# frozen_string_literal: true
require 'gir_ffi_test_helper'

describe GirFFI::TypeMap do
  describe '.type_specification_to_ffi_type' do
    it 'returns the nested FFI::Enum for an Enum module' do
      GirFFI::TypeMap.type_specification_to_ffi_type(GLib::DateMonth).
        must_equal GLib::DateMonth
    end

    it 'returns the class itself for a Struct class' do
      GirFFI::TypeMap.type_specification_to_ffi_type(GObject::EnumValue).
        must_equal GObject::EnumValue
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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