Sha256: 5424b91ae24970df5af61c887c6e8672524d7d4ce30b93ae8d6a083c8920ffe0

Contents?: true

Size: 579 Bytes

Versions: 1

Compression:

Stored size: 579 Bytes

Contents

require 'spec_helper'

module NNCore
  describe "nn_symbol" do

    context "given an initialized library" do

      it "returns a string constant given an index of 0" do
        value = FFI::MemoryPointer.new(:int)

        constant_string = LibNanomsg.nn_symbol(0, value)
        constant_string.should be_a(String)
      end

      it "returns an integer value in the second parameter given an index of 0" do
        value = FFI::MemoryPointer.new(:int)

        constant_string = LibNanomsg.nn_symbol(0, value)
        value.read_int.should >= 0
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nn-core-0.2.1 spec/nn_symbol_spec.rb