Sha256: c7f71506de35d6b052aa600249915d659a0c6e4896ab5a5b4d6d40c0e1397e5f

Contents?: true

Size: 376 Bytes

Versions: 1

Compression:

Stored size: 376 Bytes

Contents

require File.expand_path('../test_helper.rb', File.dirname(__FILE__))

describe GirFFI::IBaseInfo do
  describe "#safe_name" do
    it "makes names starting with an underscore safe" do
      stub(ptr = Object.new).null? { false }

      info = GirFFI::IBaseInfo.wrap ptr

      stub(info).name { "_foo" }

      assert_equal "Private___foo", info.safe_name
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gir_ffi-0.0.14 test/unit/i_base_info_test.rb