Skip to content

Commit

Permalink
[ruby/fiddle] Add support for more "short" variants
Browse files Browse the repository at this point in the history
  • Loading branch information
kou authored and hsbt committed Jun 28, 2023
1 parent 731d277 commit 74e0492
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/fiddle/test_cparser.rb
Expand Up @@ -24,14 +24,32 @@ def test_short_ctype
assert_equal(TYPE_SHORT, parse_ctype('const short'))
assert_equal(TYPE_SHORT, parse_ctype('short int'))
assert_equal(TYPE_SHORT, parse_ctype('const short int'))
assert_equal(TYPE_SHORT, parse_ctype('int short'))
assert_equal(TYPE_SHORT, parse_ctype('const int short'))
assert_equal(TYPE_SHORT, parse_ctype('signed short'))
assert_equal(TYPE_SHORT, parse_ctype('const signed short'))
assert_equal(TYPE_SHORT, parse_ctype('short signed'))
assert_equal(TYPE_SHORT, parse_ctype('const short signed'))
assert_equal(TYPE_SHORT, parse_ctype('signed short int'))
assert_equal(TYPE_SHORT, parse_ctype('const signed short int'))
assert_equal(TYPE_SHORT, parse_ctype('signed int short'))
assert_equal(TYPE_SHORT, parse_ctype('const signed int short'))
assert_equal(TYPE_SHORT, parse_ctype('int signed short'))
assert_equal(TYPE_SHORT, parse_ctype('const int signed short'))
assert_equal(TYPE_SHORT, parse_ctype('int short signed'))
assert_equal(TYPE_SHORT, parse_ctype('const int short signed'))
assert_equal(-TYPE_SHORT, parse_ctype('unsigned short'))
assert_equal(-TYPE_SHORT, parse_ctype('const unsigned short'))
assert_equal(-TYPE_SHORT, parse_ctype('unsigned short int'))
assert_equal(-TYPE_SHORT, parse_ctype('const unsigned short int'))
assert_equal(-TYPE_SHORT, parse_ctype('unsigned int short'))
assert_equal(-TYPE_SHORT, parse_ctype('const unsigned int short'))
assert_equal(-TYPE_SHORT, parse_ctype('short int unsigned'))
assert_equal(-TYPE_SHORT, parse_ctype('const short int unsigned'))
assert_equal(-TYPE_SHORT, parse_ctype('int unsigned short'))
assert_equal(-TYPE_SHORT, parse_ctype('const int unsigned short'))
assert_equal(-TYPE_SHORT, parse_ctype('int short unsigned'))
assert_equal(-TYPE_SHORT, parse_ctype('const int short unsigned'))
end

def test_int_ctype
Expand Down

0 comments on commit 74e0492

Please sign in to comment.