Sha256: 5a094e768164d221b774e563ac4548a43e2b691e4b714567f0d7e00aa0e3477b

Contents?: true

Size: 294 Bytes

Versions: 117

Compression:

Stored size: 294 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper"))

class Timeval < FFI::Struct
  layout :tv_sec, :ulong, 0, :tv_usec, :ulong, 4  
end

describe FFI::Struct do
  it "allows setting fields" do
    t = Timeval.new
    t[:tv_sec] = 12
    t[:tv_sec].should eq 12
  end
end

Version data entries

117 entries across 117 versions & 9 rubygems

Version Path
ffi-1.1.3 spec/ffi/rbx/struct_spec.rb
ffi-1.1.2-x86-mingw32 spec/ffi/rbx/struct_spec.rb
ffi-1.1.2 spec/ffi/rbx/struct_spec.rb
ffi-1.2.0.dev spec/ffi/rbx/struct_spec.rb
ffi-1.1.1-x86-mingw32 spec/ffi/rbx/struct_spec.rb
ffi-1.1.1 spec/ffi/rbx/struct_spec.rb
ffi-1.1.1.rc2 spec/ffi/rbx/struct_spec.rb
ffi-1.1.1.rc1 spec/ffi/rbx/struct_spec.rb
ffi-1.1.0-x86-mingw32 spec/ffi/rbx/struct_spec.rb
ffi-1.1.0 spec/ffi/rbx/struct_spec.rb
classiccms-0.4.2 vendor/bundle/gems/ffi-1.0.11/spec/ffi/rbx/struct_spec.rb
classiccms-0.4.1 vendor/bundle/gems/ffi-1.0.11/spec/ffi/rbx/struct_spec.rb
classiccms-0.4.0 vendor/bundle/gems/ffi-1.0.11/spec/ffi/rbx/struct_spec.rb
classiccms-0.3.9 vendor/bundle/gems/ffi-1.0.11/spec/ffi/rbx/struct_spec.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/ffi-1.0.11/spec/ffi/rbx/struct_spec.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/ffi-1.0.11/spec/ffi/rbx/struct_spec.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/ffi-1.0.11/spec/ffi/rbx/struct_spec.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/ffi-1.0.11/spec/ffi/rbx/struct_spec.rb
classiccms-0.3.8 vendor/bundle/gems/ffi-1.0.11/spec/ffi/rbx/struct_spec.rb
classiccms-0.3.7 vendor/bundle/gems/ffi-1.0.11/spec/ffi/rbx/struct_spec.rb