mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
0713f89944
with DL. * ext/fiddle/fiddle.h: ditto * ext/fiddle/lib/fiddle/cparser.rb: importing the C parser for DL backwards compatibility. * ext/fiddle/lib/fiddle/import.rb: importing the import DSL for DL backwards compatibility. * ext/fiddle/lib/fiddle/pack.rb: importing structure pack for DL backwards compatibility. * ext/fiddle/lib/fiddle/value.rb: ditto * ext/fiddle/lib/fiddle/struct.rb: importing struct DSL for DL backwards compatibility. * test/dl/test_c_struct_entry.rb: importing tests * test/dl/test_c_union_entity.rb: ditto * test/dl/test_cparser.rb: ditto * test/dl/test_import.rb: ditto * test/fiddle/test_c_struct_entry.rb: ditto * test/fiddle/test_c_union_entity.rb: ditto * test/fiddle/test_cparser.rb: ditto * test/fiddle/test_import.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
33 lines
689 B
Ruby
33 lines
689 B
Ruby
require_relative 'helper'
|
|
|
|
require 'fiddle/cparser'
|
|
|
|
module Fiddle
|
|
class TestCParser < TestCase
|
|
include CParser
|
|
|
|
def test_uint_ctype
|
|
assert_equal(-TYPE_INT, parse_ctype('uint'))
|
|
end
|
|
|
|
def test_size_t_ctype
|
|
assert_equal(TYPE_SIZE_T, parse_ctype("size_t"))
|
|
end
|
|
|
|
def test_ssize_t_ctype
|
|
assert_equal(TYPE_SSIZE_T, parse_ctype("ssize_t"))
|
|
end
|
|
|
|
def test_ptrdiff_t_ctype
|
|
assert_equal(TYPE_PTRDIFF_T, parse_ctype("ptrdiff_t"))
|
|
end
|
|
|
|
def test_intptr_t_ctype
|
|
assert_equal(TYPE_INTPTR_T, parse_ctype("intptr_t"))
|
|
end
|
|
|
|
def test_uintptr_t_ctype
|
|
assert_equal(TYPE_UINTPTR_T, parse_ctype("uintptr_t"))
|
|
end
|
|
end
|
|
end
|