Imported Upstream version 2.9.0
[debian/cc1111] / support / regression / COVERAGE
1 Primary goal: good coverage of the backend code generators.  The
2 following list was derived from the token list in SDCC.lex
3
4 Follows is a list of tokens and the test case that covers them.  If no
5 case is listed then the token is not yet covered.  Special cases are
6 listed under the token.  If the token is listed as covered then the
7 special cases are also covered.
8
9 The cases generally assume that on stack local variables and
10 parameters are accessed using the same methods and hence doesn't test
11 stack based parameters.
12
13 Todo
14 Operations:
15         Shifts:
16                 Common cases:
17                         For byte multiples (8, 16...)
18                         For more than the word size
19                         For negative shifts
20                         For shift of 1
21                 >>=
22                 <<=
23                 >>
24                 <<
25
26         Comparison:
27                 Common cases:
28                         Around zero
29                         Constants on either side (reversal)
30                 <=
31                 >=
32                 ==
33                 !=
34                 <
35                 >
36
37         Basic arithmetic:
38                 Common cases:
39                         For small constants (<3)
40                 ++
41                 --
42                 +=
43                 -=
44                 -
45                 +
46
47         Mul/Div/Mod arithmetic:
48                 Common cases:
49                         For powers of 2                               
50                 *=
51                 /=
52                 %=
53                 *
54                 /
55                 %
56
57         Bitwise operations:
58                 &=
59                 ^=
60                 |=
61                 &
62                 ~
63                 ^
64                 |
65
66         Logical operations:
67                 &&
68                 ||
69                 !
70
71         Misc:
72                 ->
73                         Test that members are not cached across
74 function calls
75                 =
76                 .
77                 ?
78                 casts
79                         Test sign extension
80                 arrays
81                         Test a[a[const]]
82                 pointers
83
84         Language features (untestable):
85                 ;
86                 {
87                 }
88                 ,
89                 :
90                 (
91                 )
92                 [
93                 ]
94
95 Keywords:
96         Specificers:
97                 const
98                 register
99                 signed
100                 static
101                 unsigned
102                 volatile
103
104         Conditional:
105                 break
106                 case
107                 default
108                 else
109                 goto
110                 if
111                 switch
112
113         Types:
114                 char
115                 double
116                 float
117                 int
118                 long
119                 short
120                 void
121
122         Iterative:
123                 continue
124                 do
125                 for
126                 while
127
128         Language features:
129                 enum
130                 extern
131                 sizeof
132                 struct
133                 typedef
134                 union
135
136         Misc:
137                 return
138
139         Unknown:
140                 auto
141                 interrupt
142
143 Optional keywords:
144         banked
145         bit
146         flash
147         code
148         critical
149         near
150         data
151         eeprom
152         idata
153         nonbanked
154         pdata
155         reentrant
156         sbit
157         sfr
158         using
159         sram
160         xdata
161         far
162         _code
163         _flash
164         _eeprom
165         _generic
166         _idata
167         _data
168         _near
169         _pdata
170         _sram
171         _xdata
172
173 Language features:
174         va args (...)
175
176 Optional:
177         Constants:
178                 Hex, dec, oct
179                 Character constants     'x'
180                 Specials                '\n', '\0', ...