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
/
getbyte_param.c
blob
7cb478e48ec2e2b0f57e5005805e8bfd09f81a0f
1
/** getbyte_param.c - test for bug #3269
2
*/
3
#include <testfwk.h>
4
#include <stdlib.h>
5
6
void
7
fCheckPlus
(
unsigned char
c
)
8
{
9
ASSERT
(
c
==
0x15
);
10
}
11
void
12
fCheckMinus
(
unsigned char
c
)
13
{
14
ASSERT
(
c
==
0x13
);
15
}
16
void
17
getByteParam
(
unsigned int
i
)
18
{
19
unsigned char
c
;
20
21
c
=
i
>>
8
;
22
c
++;
23
fCheckPlus
(
c
);
24
c
=
i
>>
8
;
25
c
--;
26
fCheckMinus
(
c
);
27
}
28
29
void
30
testGetByte
(
void
)
31
{
32
getByteParam
(
0x147A
);
33
}