repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
struct / union in initializer, RFE #901.
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
uminus.c.in
blob
ce98c6c99cab54af99ec10371c5cda55f9075696
1
/* Test unary minus
2
3
lefttype: signed char, short, long
4
resulttype: signed char, short, long
5
storage: static,
6
attr: volatile,
7
*/
8
#include <testfwk.h>
9
10
void
11
testUMinus
(
void
)
12
{
13
{
storage
} {
attr
} {
lefttype
}
left
;
14
{
storage
} {
attr
} {
resulttype
}
result
;
15
16
left
=
53
;
17
result
= -
left
;
18
19
ASSERT
(
result
== -
53
);
20
21
left
= -
76
;
22
result
= -
left
;
23
24
ASSERT
(
result
==
76
);
25
}