Sha256: 930737161989640ac849615e11ab046a1b3763550eee66de8bbcbf31db7fa602

Contents?: true

Size: 999 Bytes

Versions: 6

Compression:

Stored size: 999 Bytes

Contents

require 'base_test_helper'

require 'ffi-gobject_introspection'

module IntrospectionTestExtensions
  module_function

  def get_introspection_data(namespace, name)
    gir = GObjectIntrospection::IRepository.default
    gir.require namespace, nil
    gir.find_by_name namespace, name
  end

  def get_field_introspection_data(namespace, klass, name)
    get_introspection_data(namespace, klass).find_field name
  end

  def get_method_introspection_data(namespace, klass, name)
    get_introspection_data(namespace, klass).find_method name
  end

  def get_property_introspection_data(namespace, klass, name)
    get_introspection_data(namespace, klass).find_property name
  end

  def get_signal_introspection_data(namespace, klass, name)
    get_introspection_data(namespace, klass).find_signal name
  end

  def get_vfunc_introspection_data(namespace, klass, name)
    get_introspection_data(namespace, klass).find_vfunc name
  end
end

Minitest::Test.send :include, IntrospectionTestExtensions

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gir_ffi-0.9.2 test/introspection_test_helper.rb
gir_ffi-0.9.1 test/introspection_test_helper.rb
gir_ffi-0.9.0 test/introspection_test_helper.rb
gir_ffi-0.8.6 test/introspection_test_helper.rb
gir_ffi-0.8.5 test/introspection_test_helper.rb
gir_ffi-0.8.4 test/introspection_test_helper.rb