summaryrefslogtreecommitdiff
path: root/test/dl/test_cparser.rb
blob: a4deb6733ec930f59573fa8ada88280fab75f5a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
require_relative 'test_base'

require 'dl/cparser'

module DL
  class TestCParser < TestBase
    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
space?id=e9ba3042e13313944fd2695731d0d7498532b80f&id2=c505448cdbd4cd1a52ed7108095f6738d29b3419'>diff)
Indicate if a shape is too_complex in ObjectSpace#dump
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6939
Diffstat (limited to 'test/objspace')
-rw-r--r--test/objspace/test_objspace.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb