Sha256: d097c7b880f78c63f5e6a4a86135df27e6106952bf2bfc9feaa9855a4d619a85

Contents?: true

Size: 574 Bytes

Versions: 19

Compression:

Stored size: 574 Bytes

Contents

require 'introspection_test_helper'

describe GObjectIntrospection::IConstantInfo do
  describe "for GLib::USEC_PER_SEC, a constant of type :gint32" do
    before do
      @info = get_introspection_data 'GLib', 'USEC_PER_SEC'
    end

    it "returns :gint32 as its type" do
      assert_equal :gint32, @info.constant_type.tag
    end

    it "returns a value union with member :v_int32 with value 1_000_000" do
      assert_equal 1_000_000, @info.value_union[:v_int32]
    end

    it "returns 1 as its value" do
      assert_equal 1_000_000, @info.value
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
gir_ffi-0.7.4 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.7.3 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.7.2 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.7.1 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.7.0 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.6.7 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.6.6 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.6.5 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.6.4 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.6.3 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.6.2 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.6.1 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.6.0 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.5.2 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.5.1 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.5.0 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.4.3 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.4.2 test/ffi-gobject_introspection/i_constant_info_test.rb
gir_ffi-0.4.1 test/ffi-gobject_introspection/i_constant_info_test.rb