annotate tests.c @ 255:7549e279fe18

Work on tests.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 16 Feb 2016 22:00:54 +0200
parents 3d1e2af4e4e6
children d56369f65941
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #include "th_types.h"
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 #include "th_util.h"
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 #include "th_string.h"
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 #include "th_crypto.h"
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 #define SET_BUF_SIZE 128
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 int failed, passed;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 char buf1[SET_BUF_SIZE+2], buf2[SET_BUF_SIZE+2];
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 int test_snprintf_do2(size_t len, const char *fmt, va_list ap)
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 {
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 int ret1, ret2, ret = 0;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 va_list tmp;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
17 memset(buf1, 0xe5, SET_BUF_SIZE+2); buf1[SET_BUF_SIZE+1] = 0;
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
18 memset(buf2, 0xe5, SET_BUF_SIZE+2); buf2[SET_BUF_SIZE+1] = 0;
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 va_copy(tmp, ap);
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 ret1 = th_vsnprintf(buf1, len, fmt, ap);
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 ret2 = vsnprintf(buf2, len, fmt, tmp);
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
25
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 if (ret1 != ret2)
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 {
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
28 THPRINT(1, " retval mismatch (%d != %d)\n", ret1, ret2);
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 ret = -1;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 }
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 if (strcmp(buf1, buf2))
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 {
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
34 THPRINT(1, " result mismatch:\n'%s' VS\n'%s'\n", buf1, buf2);
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
35 ret = -2;
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
36 }
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
37
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
38 if ((unsigned char) buf1[len] != 0xe5)
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
39 {
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
40 THPRINT(1, " buffer #1 overflow, sentinel 0x%02x\n", buf1[len]);
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 ret = -2;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 }
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
44 if ((unsigned char) buf2[len] != 0xe5)
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
45 {
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
46 THPRINT(1, " buffer #2 overflow, sentinel 0x%02x\n", buf2[len]);
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
47 ret = -2;
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
48 }
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
49
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
50 if (ret != 0)
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
51 THPRINT(1, "th_vsnprintf(%" TH_PRIu_SIZE_T ", '%s'): ", len, fmt);
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
52
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53 if (ret == 0)
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
54 THPRINT(1, "OK\n");
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
55
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
56 return ret;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57 }
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 void test_snprintf_do(size_t len, const char *fmt, va_list ap)
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 {
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
62 int ret = test_snprintf_do2(len, fmt, ap);
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
63 if (ret == 0)
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64 passed++;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 else
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66 failed++;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67 }
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
70 void test_snprintf(const char *fmt, ...)
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71 {
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72 va_list ap, tmp;
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
73 THPRINT(1, "----------------------------------------------\n");
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74 va_start(ap, fmt);
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75 va_copy(tmp, ap); test_snprintf_do(0, fmt, tmp);
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
76 va_copy(tmp, ap); test_snprintf_do(1, fmt, tmp);
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
77 va_copy(tmp, ap); test_snprintf_do(2, fmt, tmp);
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78 va_copy(tmp, ap); test_snprintf_do(16, fmt, tmp);
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79 va_copy(tmp, ap); test_snprintf_do(SET_BUF_SIZE, fmt, tmp);
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
80 va_end(ap);
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
81 THPRINT(1, "----------------------------------------------\n");
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82 }
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
85 int main(int argc, char *argv[])
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
86 {
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
87 (void) argc;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88 (void) argv;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
90 //
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
91 // Initialization
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
92 //
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93 th_init("th-test", "th-libs unit tests", "0.0.1", NULL, NULL);
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
94 th_verbosityLevel = 0;
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96 if (sizeof(char) != sizeof(unsigned char))
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 {
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
98 THERR("sizeof(char) != sizeof(unsigned char)???\n");
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99 return -1;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100 }
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
101
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102 failed = passed = 0;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
104 //
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
105 // Test series #1
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
106 //
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
107 THPRINT(0, "printf() family function tests.\n");
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108 int i_vals[] = { 2, 612342, -2, -612342, 0x1fff, 0x8000000, };
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
109 char *i_fmts[] = { "%d", "%x", "%05d", "%5d", "%-5d", "%05x", "%5x", };
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
110 size_t i1, i2;
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112 for (i1 = 0; i1 < sizeof(i_vals) / sizeof(i_vals[0]); i1++)
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113 for (i2 = 0; i2 < sizeof(i_fmts) / sizeof(i_fmts[0]); i2++)
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114 test_snprintf(i_fmts[i2], i_vals);
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
116 char *s_vals[] = { "", "asdf", "xxx yyy zzz ppp fff", NULL, "X" };
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
117 char *s_fmts[] = { "%s", "%2s", "%-2s", "%5s", "%-5s", "%16s", "%-16s", "%1s", "%-1s", };
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119 for (i1 = 0; i1 < sizeof(s_vals) / sizeof(s_vals[0]); i1++)
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120 for (i2 = 0; i2 < sizeof(s_fmts) / sizeof(s_fmts[0]); i2++)
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
121 test_snprintf(s_fmts[i2], s_vals);
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
122
255
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
123
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
124 //
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
125 // Print summary and exit
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
126 //
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
127 THPRINT(0, "%d tests failed, %d passed.\n",
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
128 failed, passed);
7549e279fe18 Work on tests.
Matti Hamalainen <ccr@tnsp.org>
parents: 254
diff changeset
129
254
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
130 return 0;
3d1e2af4e4e6 Start of a very simplistic unit test suite. Initially handling just printf()
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
131 }