Sha256: a3cef5e4fbdf76d9421b8b628a8b4e3343a386cb5215a4a5735fc411d046ac92

Contents?: true

Size: 541 Bytes

Versions: 4

Compression:

Stored size: 541 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

4 entries across 4 versions & 1 rubygems

Version Path
gir_ffi-0.15.3 test/ffi-glib/destroy_notify_test.rb
gir_ffi-0.15.2 test/ffi-glib/destroy_notify_test.rb
gir_ffi-0.15.1 test/ffi-glib/destroy_notify_test.rb
gir_ffi-0.15.0 test/ffi-glib/destroy_notify_test.rb