Skip to content

Commit 4598e6c

Browse files
committed
Add support for more "short" variants
1 parent 2b22bb9 commit 4598e6c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/fiddle/test_cparser.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,32 @@ def test_short_ctype
2424
assert_equal(TYPE_SHORT, parse_ctype('const short'))
2525
assert_equal(TYPE_SHORT, parse_ctype('short int'))
2626
assert_equal(TYPE_SHORT, parse_ctype('const short int'))
27+
assert_equal(TYPE_SHORT, parse_ctype('int short'))
28+
assert_equal(TYPE_SHORT, parse_ctype('const int short'))
2729
assert_equal(TYPE_SHORT, parse_ctype('signed short'))
2830
assert_equal(TYPE_SHORT, parse_ctype('const signed short'))
31+
assert_equal(TYPE_SHORT, parse_ctype('short signed'))
32+
assert_equal(TYPE_SHORT, parse_ctype('const short signed'))
2933
assert_equal(TYPE_SHORT, parse_ctype('signed short int'))
3034
assert_equal(TYPE_SHORT, parse_ctype('const signed short int'))
35+
assert_equal(TYPE_SHORT, parse_ctype('signed int short'))
36+
assert_equal(TYPE_SHORT, parse_ctype('const signed int short'))
37+
assert_equal(TYPE_SHORT, parse_ctype('int signed short'))
38+
assert_equal(TYPE_SHORT, parse_ctype('const int signed short'))
39+
assert_equal(TYPE_SHORT, parse_ctype('int short signed'))
40+
assert_equal(TYPE_SHORT, parse_ctype('const int short signed'))
3141
assert_equal(-TYPE_SHORT, parse_ctype('unsigned short'))
3242
assert_equal(-TYPE_SHORT, parse_ctype('const unsigned short'))
3343
assert_equal(-TYPE_SHORT, parse_ctype('unsigned short int'))
3444
assert_equal(-TYPE_SHORT, parse_ctype('const unsigned short int'))
45+
assert_equal(-TYPE_SHORT, parse_ctype('unsigned int short'))
46+
assert_equal(-TYPE_SHORT, parse_ctype('const unsigned int short'))
47+
assert_equal(-TYPE_SHORT, parse_ctype('short int unsigned'))
48+
assert_equal(-TYPE_SHORT, parse_ctype('const short int unsigned'))
49+
assert_equal(-TYPE_SHORT, parse_ctype('int unsigned short'))
50+
assert_equal(-TYPE_SHORT, parse_ctype('const int unsigned short'))
51+
assert_equal(-TYPE_SHORT, parse_ctype('int short unsigned'))
52+
assert_equal(-TYPE_SHORT, parse_ctype('const int short unsigned'))
3553
end
3654

3755
def test_int_ctype

0 commit comments

Comments
 (0)