]> git.gag.com Git - fw/sdcc/blob - support/regression/tests/float.c
* src/z80/ralloc.c (packRegsForHLUse): Banned IFXs from being packed into HL.
[fw/sdcc] / support / regression / tests / float.c
1 /* Simple floating pt tests.
2  */
3 #include <testfwk.h>
4
5 void
6 testFloatAdd(void)
7 {
8   volatile float result, left, right;
9
10   left = 4;
11   right = 5;
12   ASSERT(left+right == 9);
13
14   left = 7;
15   right = -3;
16   ASSERT(left+right == 4);
17
18   left = -1234;
19   right = 409;
20   ASSERT(left+right == (-1234+409));
21
22   left = -34567;
23   right = -123456;
24   ASSERT(left+right == (-34567-123456));
25 }