struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / uminus.c.in
blobce98c6c99cab54af99ec10371c5cda55f9075696
1 /* Test unary minus
3 lefttype: signed char, short, long
4 resulttype: signed char, short, long
5 storage: static,
6 attr: volatile,
7 */
8 #include <testfwk.h>
10 void
11 testUMinus(void)
13 {storage} {attr} {lefttype} left;
14 {storage} {attr} {resulttype} result;
16 left = 53;
17 result = -left;
19 ASSERT(result == -53);
21 left = -76;
22 result = -left;
24 ASSERT(result == 76);