Sha256: 73dbf8cfa3b7668d88fd7510c1c4f34db68b2bb4ebb6337f5bc7cfa8e0a865f7

Contents?: true

Size: 715 Bytes

Versions: 1

Compression:

Stored size: 715 Bytes

Contents

# frozen_string_literal: true
require 'gir_ffi_test_helper'

# Tests generated methods and functions in the GTop namespace. This namespace
# contains types with bad names, like 'glibtop_cpu'.
describe 'The generated GTop module' do
  cover 'GTop'

  before do
    begin
      GirFFI.setup :GTop
    rescue
      skip 'No GIR data for GTop available'
    end
  end

  describe 'Glibtop' do
    it 'is a valid struct class' do
      GTop::Glibtop.ancestors.must_include GirFFI::StructBase
    end

    it 'can be created using Glibtop.init' do
      skip unless get_method_introspection_data 'GTop', 'glibtop', 'init'
      instance = GTop::Glibtop.init
      instance.must_be_kind_of GTop::Glibtop
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gir_ffi-0.11.0 test/integration/generated_gtop_test.rb