Sha256: 20bae3ebb1cb827c5b72f1107c6127287b2c6b44f43fb0e591a0ea0a2616adbe

Contents?: true

Size: 535 Bytes

Versions: 9

Compression:

Stored size: 535 Bytes

Contents

# frozen_string_literal: true

require 'gir_ffi_test_helper'

describe GLib::DestroyNotify do
  describe '.default' do
    it 'removes the passed-in key from the callback store' do
      dummy_proc = 'some-callback'
      GirFFI::CallbackBase.store_callback dummy_proc
      GirFFI::CallbackBase::CALLBACKS[dummy_proc.object_id].wont_be_nil

      user_data = GirFFI::ArgHelper.store dummy_proc
      GLib::DestroyNotify.default.call user_data

      GirFFI::CallbackBase::CALLBACKS[dummy_proc.object_id].must_be_nil
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-0.14.1 test/ffi-glib/destroy_notify_test.rb
gir_ffi-0.14.0 test/ffi-glib/destroy_notify_test.rb
gir_ffi-0.13.1 test/ffi-glib/destroy_notify_test.rb
gir_ffi-0.13.0 test/ffi-glib/destroy_notify_test.rb
gir_ffi-0.12.1 test/ffi-glib/destroy_notify_test.rb
gir_ffi-0.12.0 test/ffi-glib/destroy_notify_test.rb
gir_ffi-0.11.4 test/ffi-glib/destroy_notify_test.rb
gir_ffi-0.11.3 test/ffi-glib/destroy_notify_test.rb
gir_ffi-0.11.2 test/ffi-glib/destroy_notify_test.rb