]> git.draconx.ca Git - cdecl99.git/blob - tests/randomdecl-sanity.sed
Add a sanity test for randomdecl.
[cdecl99.git] / tests / randomdecl-sanity.sed
1 #n
2 # Checks for key bits in English declarations.  This file is itself parsed
3 # to determine the things checked for: lines containing "=yes" are assumed
4 # to be variables to be tested, and must be followed by a # and a comment
5 # stating the feature being tested.
6 #
7 # Copyright © 2012 Nick Bowler
8 #
9 # License WTFPL2: Do What The Fuck You Want To Public License, version 2.
10 # This is free software: you are free to do what the fuck you want to.
11 # There is NO WARRANTY, to the extent permitted by law.
12 10000q
13 /^declare/i\
14 declaration=yes # declaration of an identifier
15 /^type/i\
16 abstract=yes # type name
17 /inline/i\
18 inline=yes # inline function
19 /inline inline/i\
20 redundant_funcspec=yes # redundant function specifiers
21 /function ([[:alnum:]_]* as/i\
22 named_parameter=yes # named function parameter
23 /function (void)/i\
24 empty_prototype=yes # empty prototype declaration
25 /function returning/i\
26 non_prototype=yes # non-prototype function declaration.
27 /\.\.\.)/i\
28 variadic=yes # variadic function
29 /const/i\
30 const=yes # const qualifier
31 /volatile/i\
32 volatile=yes # volatile qualifier
33 /restrict/i\
34 restrict=yes # restrict qualifier
35 /const const/i\
36 redundant_qualifier=yes # redundant type qualifiers
37 /variable-length array/i\
38 vla=yes # variable-length array
39 /static/i\
40 static=yes # static storage-class specifier
41 /extern/i\
42 extern=yes # extern storage-class specifier
43 /typedef/i\
44 typedef=yes # typedef storage-class specifier
45 /auto/i\
46 auto=yes # auto storage-class specifier
47 /register/i\
48 register=yes # register storage-class specifier
49 /void/i\
50 void=yes # void type specifier
51 /char/i\
52 char=yes # char type specifier
53 /short/i\
54 short=yes # short type specifier
55 /int/i\
56 int=yes # int type specifier
57 /long/i\
58 long=yes # long type specifier
59 /float/i\
60 float=yes # float type specifier
61 /double/i\
62 double=yes # double type specifier
63 /signed/i\
64 signed=yes # signed type specifier
65 /unsigned/i\
66 unsigned=yes # unsigned type specifier
67 /_Bool/i\
68 bool=yes # _Bool type specifier
69 /_Complex/i\
70 complex=yes # _Complex type specifier
71 /_Imaginary/i\
72 imaginary=yes # _Imaginary type specifier
73 /struct/i\
74 struct=yes # struct type specifier
75 /union/i\
76 union=yes # union type specifier
77 /enum/i\
78 enum=yes # enum type specifier
79 /pointer to array/i\
80 pointer_to_array=yes # pointer to an array
81 /pointer to function/i\
82 pointer_to_function=yes # pointer to a function