~donmcc/ood

ref: 1182412fd4ece0cb55c4b3ebefee78b22c8c15bd ood/src/libood/ood_tests.c -rw-r--r-- 639 bytes
1182412fDon McCaughey Add `ood_halt()` function. 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>

#include "ood.h"


void inet_address_test(void);
void inet_socket_test(void);
void ptr_array_test(void);
void rss_document_test(void);
void sockaddr_test(void);
void sockaddr_in_test(void);


static void
test_max(void)
{
    assert(42 == ood_max(42, 21));
    assert(42 == ood_max(21, 42));
    assert(42 == ood_max(42, 42));
}


int
main(int argc, char *argv[])
{
    inet_address_test();
    inet_socket_test();

    ptr_array_test();

    rss_document_test();

    sockaddr_test();
    sockaddr_in_test();

    test_max();

    return EXIT_SUCCESS;
}