diff --git a/test/fiddle/test_cparser.rb b/test/fiddle/test_cparser.rb index b34b4c6fa5156b..bb4bc0b8e054ff 100644 --- a/test/fiddle/test_cparser.rb +++ b/test/fiddle/test_cparser.rb @@ -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