]> git.sur5r.net Git - cc65/blob - test/val/postincdec.c
remote TABs in doc/ and test/
[cc65] / test / val / postincdec.c
1 /*
2   !!DESCRIPTION!! char-sized post-increment and -decrement
3   !!ORIGIN!!      cc65 regression tests
4   !!LICENCE!!     Public Domain
5   !!AUTHOR!!      Lauri Kasanen
6 */
7
8
9 static unsigned char val, array[2];
10
11 int main() {
12
13         val = 0;
14         array[0] = array[1] = 10;
15
16         array[val++] = 2;
17         array[val++] = 2;
18         --val;
19         array[val--] = 0;
20         array[val--] = 0;
21
22         return (array[0] == array[1] && array[0] == 0 && val == 0xff) ? 0 : 1;
23 }