This source file includes following definitions.
- main
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #include <config.h>
18
19 #include <inttypes.h>
20
21 #include "signature.h"
22 SIGNATURE_CHECK (imaxdiv, imaxdiv_t, (intmax_t, intmax_t));
23
24 #include "macros.h"
25
26 int
27 main (void)
28 {
29 {
30 imaxdiv_t result = imaxdiv (101, 7);
31 ASSERT (result.quot == 14);
32 ASSERT (result.rem == 3);
33 }
34 {
35 imaxdiv_t result = imaxdiv (-101, 7);
36 ASSERT (result.quot == -14);
37 ASSERT (result.rem == -3);
38 }
39 {
40 imaxdiv_t result = imaxdiv (101, -7);
41 ASSERT (result.quot == -14);
42 ASSERT (result.rem == 3);
43 }
44 {
45 imaxdiv_t result = imaxdiv (-101, -7);
46 ASSERT (result.quot == 14);
47 ASSERT (result.rem == -3);
48 }
49
50 return 0;
51 }