Sha256: fec4ce2d1714de6a0958af373e603368fefb341844d396841e2313b4c2945c6a

Contents?: true

Size: 448 Bytes

Versions: 5

Compression:

Stored size: 448 Bytes

Contents

require 'test_helper'

describe "Function pointers into class methods" do

  before(:all) do
    Extension.new "function_pointers_class" do |e|
      e.sources full_dir("headers/function_pointers_class.h")
      node = e.namespace "function_pointers_class"
    end

    require 'function_pointers_class'
  end


  specify "works" do
    t = PointerTest.new
    t.set_callback do |i|
      42
    end

    t.call_callback(12).should == 42
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rbplusplus-1.2.0 test/function_pointers_classes_test.rb
rbplusplus-1.1.0 test/function_pointers_classes_test.rb
rbplusplus-1.0.3 test/function_pointers_classes_test.rb
rbplusplus-1.0.1 test/function_pointers_classes_test.rb
rbplusplus-1.0 test/function_pointers_classes_test.rb