Commit de3a8452a420a0d9fe25a46381639f367c376e7f

Thomas de Grivel 2023-04-12T22:46:33

TEST_CASE_PROTOTYPE

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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
diff --git a/test/bool_test.c b/test/bool_test.c
index bb297db..e499218 100644
--- a/test/bool_test.c
+++ b/test/bool_test.c
@@ -27,8 +27,8 @@
   } while (0)
 
 void bool_test ();
-void bool_test_compat ();
-void bool_test_inspect ();
+TEST_CASE_PROTOTYPE(bool_compat);
+TEST_CASE_PROTOTYPE(bool_inspect);
 
 void bool_test ()
 {
diff --git a/test/buf_file_test.c b/test/buf_file_test.c
index 1e8c953..895c467 100644
--- a/test/buf_file_test.c
+++ b/test/buf_file_test.c
@@ -15,10 +15,10 @@
 #include "test.h"
 
 void buf_file_test ();
-void buf_file_test_open_r_close ();
-void buf_file_test_open_r_refill ();
-void buf_file_test_open_w_close ();
-void buf_file_test_open_w_flush ();
+TEST_CASE_PROTOTYPE(buf_file_open_r_close);
+TEST_CASE_PROTOTYPE(buf_file_open_r_refill);
+TEST_CASE_PROTOTYPE(buf_file_open_w_close);
+TEST_CASE_PROTOTYPE(buf_file_open_w_flush);
 
 void buf_file_test ()
 {
diff --git a/test/buf_inspect_test.c b/test/buf_inspect_test.c
index bb52cf8..6a49746 100644
--- a/test/buf_inspect_test.c
+++ b/test/buf_inspect_test.c
@@ -154,16 +154,16 @@
   } while (0)
 
 void buf_inspect_test ();
-void buf_inspect_test_bool ();
-void buf_inspect_test_character ();
-void buf_inspect_test_f32 ();
-void buf_inspect_test_f64 ();
-void buf_inspect_test_integer ();
-void buf_inspect_test_list ();
-void buf_inspect_test_str ();
-void buf_inspect_test_str_character ();
-void buf_inspect_test_str_character_size ();
-void buf_inspect_test_tag ();
+TEST_CASE_PROTOTYPE(buf_inspect_bool);
+TEST_CASE_PROTOTYPE(buf_inspect_character);
+TEST_CASE_PROTOTYPE(buf_inspect_f32);
+TEST_CASE_PROTOTYPE(buf_inspect_f64);
+TEST_CASE_PROTOTYPE(buf_inspect_integer);
+TEST_CASE_PROTOTYPE(buf_inspect_list);
+TEST_CASE_PROTOTYPE(buf_inspect_str);
+TEST_CASE_PROTOTYPE(buf_inspect_str_character);
+TEST_CASE_PROTOTYPE(buf_inspect_str_character_size);
+TEST_CASE_PROTOTYPE(buf_inspect_tag);
 
 void buf_inspect_test ()
 {
diff --git a/test/buf_parse_test.c b/test/buf_parse_test.c
index be9cc09..126d260 100644
--- a/test/buf_parse_test.c
+++ b/test/buf_parse_test.c
@@ -653,41 +653,41 @@
   void buf_parse_test_u ## bits ## _hexadecimal ();                    \
   void buf_parse_test_u ## bits ## _octal ()
 
-void buf_parse_test_bool ();
-void buf_parse_test_call ();
-void buf_parse_test_call_op ();
-void buf_parse_test_cfn ();
-void buf_parse_test_character ();
-void buf_parse_test_digit_bin ();
-void buf_parse_test_digit_hex ();
-void buf_parse_test_digit_oct ();
-void buf_parse_test_digit_dec ();
-void buf_parse_test_f32 ();
-void buf_parse_test_f64 ();
-void buf_parse_test_fn ();
-void buf_parse_test_integer ();
-void buf_parse_test_integer_dec ();
-void buf_parse_test_integer_hex ();
-void buf_parse_test_integer_oct ();
-void buf_parse_test_integer_bin ();
-void buf_parse_test_ident ();
-void buf_parse_test_list ();
+TEST_CASE_PROTOTYPE(buf_parse_bool);
+TEST_CASE_PROTOTYPE(buf_parse_call);
+TEST_CASE_PROTOTYPE(buf_parse_call_op);
+TEST_CASE_PROTOTYPE(buf_parse_cfn);
+TEST_CASE_PROTOTYPE(buf_parse_character);
+TEST_CASE_PROTOTYPE(buf_parse_digit_bin);
+TEST_CASE_PROTOTYPE(buf_parse_digit_hex);
+TEST_CASE_PROTOTYPE(buf_parse_digit_oct);
+TEST_CASE_PROTOTYPE(buf_parse_digit_dec);
+TEST_CASE_PROTOTYPE(buf_parse_f32);
+TEST_CASE_PROTOTYPE(buf_parse_f64);
+TEST_CASE_PROTOTYPE(buf_parse_fn);
+TEST_CASE_PROTOTYPE(buf_parse_integer);
+TEST_CASE_PROTOTYPE(buf_parse_integer_dec);
+TEST_CASE_PROTOTYPE(buf_parse_integer_hex);
+TEST_CASE_PROTOTYPE(buf_parse_integer_oct);
+TEST_CASE_PROTOTYPE(buf_parse_integer_bin);
+TEST_CASE_PROTOTYPE(buf_parse_ident);
+TEST_CASE_PROTOTYPE(buf_parse_list);
 BUF_PARSE_TEST_S_PROTOTYPE(8);
 BUF_PARSE_TEST_S_PROTOTYPE(16);
 BUF_PARSE_TEST_S_PROTOTYPE(32);
 BUF_PARSE_TEST_S_PROTOTYPE(64);
-void buf_parse_test_sw ();
-void buf_parse_test_str ();
-void buf_parse_test_str_character ();
-void buf_parse_test_str_u8 ();
-void buf_parse_test_sym ();
-void buf_parse_test_tag ();
-void buf_parse_test_tuple ();
+TEST_CASE_PROTOTYPE(buf_parse_sw);
+TEST_CASE_PROTOTYPE(buf_parse_str);
+TEST_CASE_PROTOTYPE(buf_parse_str_character);
+TEST_CASE_PROTOTYPE(buf_parse_str_u8);
+TEST_CASE_PROTOTYPE(buf_parse_sym);
+TEST_CASE_PROTOTYPE(buf_parse_tag);
+TEST_CASE_PROTOTYPE(buf_parse_tuple);
 BUF_PARSE_TEST_U_PROTOTYPE(8);
 BUF_PARSE_TEST_U_PROTOTYPE(16);
 BUF_PARSE_TEST_U_PROTOTYPE(32);
 BUF_PARSE_TEST_U_PROTOTYPE(64);
-void buf_parse_test_uw ();
+TEST_CASE_PROTOTYPE(buf_parse_uw);
 
 void buf_parse_test ()
 {
diff --git a/test/buf_test.c b/test/buf_test.c
index bac6b0f..31e8c2a 100644
--- a/test/buf_test.c
+++ b/test/buf_test.c
@@ -131,48 +131,48 @@
     test_context(NULL);                                                \
   } while (0)
 
-void buf_test_f ();
-void buf_test_init_clean ();
-void buf_test_ignore ();
-void buf_test_new_delete ();
-void buf_test_new_alloc_delete ();
-void buf_test_peek_1 ();
-void buf_test_peek_character_utf8 ();
-void buf_test_peek_f32 ();
-void buf_test_peek_f64 ();
-void buf_test_peek_s8 ();
-void buf_test_peek_s16 ();
-void buf_test_peek_s32 ();
-void buf_test_peek_s64 ();
-void buf_test_peek_u8 ();
-void buf_test_peek_u16 ();
-void buf_test_peek_u32 ();
-void buf_test_peek_u64 ();
-void buf_test_read_1 ();
-void buf_test_read_character_utf8 ();
-void buf_test_read_f32 ();
-void buf_test_read_f64 ();
-void buf_test_read_s8 ();
-void buf_test_read_s16 ();
-void buf_test_read_s32 ();
-void buf_test_read_s64 ();
-void buf_test_read_to_str ();
-void buf_test_read_u8 ();
-void buf_test_read_u16 ();
-void buf_test_read_u32 ();
-void buf_test_read_u64 ();
-void buf_test_write_f32 ();
-void buf_test_write_f64 ();
-void buf_test_write_s8 ();
-void buf_test_write_s16 ();
-void buf_test_write_s32 ();
-void buf_test_write_s64 ();
-void buf_test_write_str ();
-void buf_test_write_u8 ();
-void buf_test_write_u16 ();
-void buf_test_write_u32 ();
-void buf_test_write_u64 ();
-void buf_test_xfer ();
+TEST_CASE_PROTOTYPE(buf_f);
+TEST_CASE_PROTOTYPE(buf_init_clean);
+TEST_CASE_PROTOTYPE(buf_ignore);
+TEST_CASE_PROTOTYPE(buf_new_delete);
+TEST_CASE_PROTOTYPE(buf_new_alloc_delete);
+TEST_CASE_PROTOTYPE(buf_peek_1);
+TEST_CASE_PROTOTYPE(buf_peek_character_utf8);
+TEST_CASE_PROTOTYPE(buf_peek_f32);
+TEST_CASE_PROTOTYPE(buf_peek_f64);
+TEST_CASE_PROTOTYPE(buf_peek_s8);
+TEST_CASE_PROTOTYPE(buf_peek_s16);
+TEST_CASE_PROTOTYPE(buf_peek_s32);
+TEST_CASE_PROTOTYPE(buf_peek_s64);
+TEST_CASE_PROTOTYPE(buf_peek_u8);
+TEST_CASE_PROTOTYPE(buf_peek_u16);
+TEST_CASE_PROTOTYPE(buf_peek_u32);
+TEST_CASE_PROTOTYPE(buf_peek_u64);
+TEST_CASE_PROTOTYPE(buf_read_1);
+TEST_CASE_PROTOTYPE(buf_read_character_utf8);
+TEST_CASE_PROTOTYPE(buf_read_f32);
+TEST_CASE_PROTOTYPE(buf_read_f64);
+TEST_CASE_PROTOTYPE(buf_read_s8);
+TEST_CASE_PROTOTYPE(buf_read_s16);
+TEST_CASE_PROTOTYPE(buf_read_s32);
+TEST_CASE_PROTOTYPE(buf_read_s64);
+TEST_CASE_PROTOTYPE(buf_read_to_str);
+TEST_CASE_PROTOTYPE(buf_read_u8);
+TEST_CASE_PROTOTYPE(buf_read_u16);
+TEST_CASE_PROTOTYPE(buf_read_u32);
+TEST_CASE_PROTOTYPE(buf_read_u64);
+TEST_CASE_PROTOTYPE(buf_write_f32);
+TEST_CASE_PROTOTYPE(buf_write_f64);
+TEST_CASE_PROTOTYPE(buf_write_s8);
+TEST_CASE_PROTOTYPE(buf_write_s16);
+TEST_CASE_PROTOTYPE(buf_write_s32);
+TEST_CASE_PROTOTYPE(buf_write_s64);
+TEST_CASE_PROTOTYPE(buf_write_str);
+TEST_CASE_PROTOTYPE(buf_write_u8);
+TEST_CASE_PROTOTYPE(buf_write_u16);
+TEST_CASE_PROTOTYPE(buf_write_u32);
+TEST_CASE_PROTOTYPE(buf_write_u64);
+TEST_CASE_PROTOTYPE(buf_xfer);
 
 void buf_test ()
 {
diff --git a/test/call_test.c b/test/call_test.c
index 184f1eb..af9461b 100644
--- a/test/call_test.c
+++ b/test/call_test.c
@@ -36,8 +36,8 @@
   } while (0)
 
 void call_test ();
-void call_test_init_1 ();
-void call_test_inspect ();
+TEST_CASE_PROTOTYPE(call_init_1);
+TEST_CASE_PROTOTYPE(call_inspect);
 
 void call_test ()
 {
diff --git a/test/cfn_test.c b/test/cfn_test.c
index 9c83e83..39463f2 100644
--- a/test/cfn_test.c
+++ b/test/cfn_test.c
@@ -21,11 +21,11 @@
 bool cfn_test_not (bool a);
 
 /* 2 */
-void cfn_test_apply ();
-void cfn_test_copy ();
-void cfn_test_init_clean ();
-void cfn_test_link ();
-void cfn_test_prep_cif ();
+TEST_CASE_PROTOTYPE(cfn_apply);
+TEST_CASE_PROTOTYPE(cfn_copy);
+TEST_CASE_PROTOTYPE(cfn_init_clean);
+TEST_CASE_PROTOTYPE(cfn_link);
+TEST_CASE_PROTOTYPE(cfn_prep_cif);
 
 /* 3 */
 void cfn_test ();
diff --git a/test/character_test.c b/test/character_test.c
index fdf00cd..de943a5 100644
--- a/test/character_test.c
+++ b/test/character_test.c
@@ -15,13 +15,13 @@
 #include "../libc3/character.h"
 #include "test.h"
 
-void character_test_1 ();
-void character_test_is_digit ();
-void character_test_is_lowercase ();
-void character_test_is_space ();
-void character_test_is_uppercase ();
-void character_test_utf8 ();
-void character_test_utf8_size ();
+TEST_CASE_PROTOTYPE(character_1);
+TEST_CASE_PROTOTYPE(character_is_digit);
+TEST_CASE_PROTOTYPE(character_is_lowercase);
+TEST_CASE_PROTOTYPE(character_is_space);
+TEST_CASE_PROTOTYPE(character_is_uppercase);
+TEST_CASE_PROTOTYPE(character_utf8);
+TEST_CASE_PROTOTYPE(character_utf8_size);
 
 void character_test ()
 {
diff --git a/test/compare_test.c b/test/compare_test.c
index 7f3a2b8..6bcee5f 100644
--- a/test/compare_test.c
+++ b/test/compare_test.c
@@ -37,14 +37,14 @@
     test_context(NULL);                                                \
   } while (0)
 
-void compare_test_bool ();
-void compare_test_character ();
-void compare_test_f32 ();
-void compare_test_f64 ();
-void compare_test_list ();
-void compare_test_str ();
-void compare_test_tag ();
-void compare_test_tuple ();
+TEST_CASE_PROTOTYPE(compare_bool);
+TEST_CASE_PROTOTYPE(compare_character);
+TEST_CASE_PROTOTYPE(compare_f32);
+TEST_CASE_PROTOTYPE(compare_f64);
+TEST_CASE_PROTOTYPE(compare_list);
+TEST_CASE_PROTOTYPE(compare_str);
+TEST_CASE_PROTOTYPE(compare_tag);
+TEST_CASE_PROTOTYPE(compare_tuple);
 
 void compare_test ()
 {
diff --git a/test/env_test.c b/test/env_test.c
index 08b43ca..a8a25bc 100644
--- a/test/env_test.c
+++ b/test/env_test.c
@@ -18,8 +18,8 @@
 #include "test.h"
 
 void env_test ();
-void env_test_eval_equal_tag ();
-void env_test_init_clean ();
+TEST_CASE_PROTOTYPE(env_eval_equal_tag);
+TEST_CASE_PROTOTYPE(env_init_clean);
 
 void env_test ()
 {
diff --git a/test/fact_test.c b/test/fact_test.c
index a69492a..8b1ed3a 100644
--- a/test/fact_test.c
+++ b/test/fact_test.c
@@ -27,8 +27,8 @@
   } while (0)
 
 void fact_test ();
-void fact_test_init ();
-void fact_test_inspect ();
+TEST_CASE_PROTOTYPE(fact_init);
+TEST_CASE_PROTOTYPE(fact_inspect);
 
 void fact_test ()
 {
diff --git a/test/facts_cursor_test.c b/test/facts_cursor_test.c
index b8f5d91..2bb8de8 100644
--- a/test/facts_cursor_test.c
+++ b/test/facts_cursor_test.c
@@ -17,8 +17,8 @@
 #include "test.h"
 
 void facts_cursor_test ();
-void facts_cursor_test_init ();
-void facts_cursor_test_next ();
+TEST_CASE_PROTOTYPE(facts_cursor_init);
+TEST_CASE_PROTOTYPE(facts_cursor_next);
 
 void facts_cursor_test ()
 {
diff --git a/test/facts_test.c b/test/facts_test.c
index 00253c8..6257216 100644
--- a/test/facts_test.c
+++ b/test/facts_test.c
@@ -20,17 +20,17 @@
 #include "test.h"
 
 void facts_test ();
-void facts_test_add ();
-void facts_test_dump_file ();
-void facts_test_find ();
-void facts_test_init_clean ();
-void facts_test_load ();
-void facts_test_log_add ();
-void facts_test_log_remove ();
-void facts_test_new_delete ();
-void facts_test_open_file ();
-void facts_test_remove ();
-void facts_test_save ();
+TEST_CASE_PROTOTYPE(facts_add);
+TEST_CASE_PROTOTYPE(facts_dump_file);
+TEST_CASE_PROTOTYPE(facts_find);
+TEST_CASE_PROTOTYPE(facts_init_clean);
+TEST_CASE_PROTOTYPE(facts_load);
+TEST_CASE_PROTOTYPE(facts_log_add);
+TEST_CASE_PROTOTYPE(facts_log_remove);
+TEST_CASE_PROTOTYPE(facts_new_delete);
+TEST_CASE_PROTOTYPE(facts_open_file);
+TEST_CASE_PROTOTYPE(facts_remove);
+TEST_CASE_PROTOTYPE(facts_save);
 
 void facts_test ()
 {
diff --git a/test/facts_with_test.c b/test/facts_with_test.c
index c35acdc..d58dae7 100644
--- a/test/facts_with_test.c
+++ b/test/facts_with_test.c
@@ -19,8 +19,8 @@
 #include "test.h"
 
 void facts_with_test ();
-void facts_with_test_ ();
-void facts_with_test_tags ();
+TEST_CASE_PROTOTYPE(facts_with_);
+TEST_CASE_PROTOTYPE(facts_with_tags);
 
 void facts_with_test ()
 {
diff --git a/test/ident_test.c b/test/ident_test.c
index 70eb5aa..cfa9915 100644
--- a/test/ident_test.c
+++ b/test/ident_test.c
@@ -43,9 +43,9 @@
   } while (0)
 
 void ident_test ();
-void ident_test_character_is_reserved ();
-void ident_test_first_character_is_reserved ();
-void ident_test_inspect ();
+TEST_CASE_PROTOTYPE(ident_character_is_reserved);
+TEST_CASE_PROTOTYPE(ident_first_character_is_reserved);
+TEST_CASE_PROTOTYPE(ident_inspect);
 
 TEST_CASE(ident_character_is_reserved)
 {
diff --git a/test/list_test.c b/test/list_test.c
index 6da279f..cb105a2 100644
--- a/test/list_test.c
+++ b/test/list_test.c
@@ -40,8 +40,8 @@
   } while (0)
 
 void list_test ();
-void list_test_1 ();
-void list_test_inspect ();
+TEST_CASE_PROTOTYPE(list_1);
+TEST_CASE_PROTOTYPE(list_inspect);
 
 void list_test ()
 {
diff --git a/test/set__fact_test.c b/test/set__fact_test.c
index 86515e6..38c681d 100644
--- a/test/set__fact_test.c
+++ b/test/set__fact_test.c
@@ -75,11 +75,11 @@
   } while (0)
 
 void set__fact_test ();
-void set__fact_test_add ();
-void set__fact_test_cursor ();
-void set__fact_test_init_clean ();
-void set__fact_test_remove ();
-void set__fact_test_resize ();
+TEST_CASE_PROTOTYPE(set__fact_add);
+TEST_CASE_PROTOTYPE(set__fact_cursor);
+TEST_CASE_PROTOTYPE(set__fact_init_clean);
+TEST_CASE_PROTOTYPE(set__fact_remove);
+TEST_CASE_PROTOTYPE(set__fact_resize);
 
 void set__fact_test ()
 {
diff --git a/test/set__tag_test.c b/test/set__tag_test.c
index ff2c446..6839e97 100644
--- a/test/set__tag_test.c
+++ b/test/set__tag_test.c
@@ -96,11 +96,11 @@
   } while (0)
 
 void set__tag_test ();
-void set__tag_test_add ();
-void set__tag_test_cursor ();
-void set__tag_test_init_clean ();
-void set__tag_test_remove ();
-void set__tag_test_resize ();
+TEST_CASE_PROTOTYPE(set__tag_add);
+TEST_CASE_PROTOTYPE(set__tag_cursor);
+TEST_CASE_PROTOTYPE(set__tag_init_clean);
+TEST_CASE_PROTOTYPE(set__tag_remove);
+TEST_CASE_PROTOTYPE(set__tag_resize);
 
 void set__tag_test ()
 {
diff --git a/test/skiplist__fact_test.c b/test/skiplist__fact_test.c
index 54b171d..7049fe1 100644
--- a/test/skiplist__fact_test.c
+++ b/test/skiplist__fact_test.c
@@ -51,10 +51,10 @@
   } while (0)
 
 void skiplist__fact_test ();
-void skiplist__fact_test_find ();
-void skiplist__fact_test_insert ();
-void skiplist__fact_test_new_delete ();
-void skiplist__fact_test_remove ();
+TEST_CASE_PROTOTYPE(skiplist__fact_find);
+TEST_CASE_PROTOTYPE(skiplist__fact_insert);
+TEST_CASE_PROTOTYPE(skiplist__fact_new_delete);
+TEST_CASE_PROTOTYPE(skiplist__fact_remove);
 
 void skiplist__fact_test ()
 {
diff --git a/test/str_test.c b/test/str_test.c
index a4c4547..1839ee7 100644
--- a/test/str_test.c
+++ b/test/str_test.c
@@ -60,19 +60,19 @@
     COMPARE_TEST_STR(&result->str, &str, 0);                           \
   } while (0)
 
-void str_test_character_is_reserved ();
-void str_test_init_clean ();
-void str_test_init_dup ();
-void str_test_init_dup_1 ();
-void str_test_inspect ();
-void str_test_new_1 ();
-void str_test_new_cpy ();
-void str_test_new_delete ();
-void str_test_new_dup ();
-void str_test_new_f ();
-void str_test_to_hex ();
-void str_test_to_ident ();
-void str_test_to_sym ();
+TEST_CASE_PROTOTYPE(str_character_is_reserved);
+TEST_CASE_PROTOTYPE(str_init_clean);
+TEST_CASE_PROTOTYPE(str_init_dup);
+TEST_CASE_PROTOTYPE(str_init_dup_1);
+TEST_CASE_PROTOTYPE(str_inspect);
+TEST_CASE_PROTOTYPE(str_new_1);
+TEST_CASE_PROTOTYPE(str_new_cpy);
+TEST_CASE_PROTOTYPE(str_new_delete);
+TEST_CASE_PROTOTYPE(str_new_dup);
+TEST_CASE_PROTOTYPE(str_new_f);
+TEST_CASE_PROTOTYPE(str_to_hex);
+TEST_CASE_PROTOTYPE(str_to_ident);
+TEST_CASE_PROTOTYPE(str_to_sym);
 
 
 void str_test ()
diff --git a/test/sym_test.c b/test/sym_test.c
index e05bfce..e0e74ed 100644
--- a/test/sym_test.c
+++ b/test/sym_test.c
@@ -31,9 +31,9 @@
     test_context(NULL);                                                \
   } while (0)
 
-void          sym_test_1 ();
+TEST_CASE_PROTOTYPE(sym_1);
 const s_sym * sym_test_1_test (const s8 *p);
-void          sym_test_inspect ();
+TEST_CASE_PROTOTYPE(sym_inspect);
 
 
 void sym_test ()
diff --git a/test/tag_test.c b/test/tag_test.c
index 4b6555c..6602999 100644
--- a/test/tag_test.c
+++ b/test/tag_test.c
@@ -24,8 +24,8 @@
   } while (0)
 
 void tag_test ();
-void tag_test_hash_u64 ();
-void tag_test_init_1 ();
+TEST_CASE_PROTOTYPE(tag_hash_u64);
+TEST_CASE_PROTOTYPE(tag_init_1);
 
 void tag_test ()
 {
diff --git a/test/test.h b/test/test.h
index 5d03611..e890f62 100644
--- a/test/test.h
+++ b/test/test.h
@@ -32,10 +32,12 @@
   } while(0)
 
 #define TEST_CASE(name)                                                \
-  void test_case_ ## name ()                                           \
-  {
+  char test_case_ ## name ()                                           \
+  {                                                                    \
+    g_test_case_name = # name;                                         \
 
 #define TEST_CASE_END(name)                                            \
+    return 0;                                                          \
   }
 
 #define TEST_EQ(test, expected)                                        \
@@ -153,6 +155,7 @@ extern long         g_test_ko;
 extern long         g_test_last_ok;
 extern long         g_test_ok;
 extern const char **g_test_targets;
+extern const char  *g_test_case_name;
 
 void test_clean ();
 void test_context (const char *context);
diff --git a/test/tuple_test.c b/test/tuple_test.c
index b8e8138..49fcf9f 100644
--- a/test/tuple_test.c
+++ b/test/tuple_test.c
@@ -73,11 +73,11 @@
   } while (0)
 
 void tuple_test ();
-void tuple_test_init_1 ();
-void tuple_test_init_clean ();
-void tuple_test_inspect ();
-void tuple_test_new_1 ();
-void tuple_test_new_delete ();
+TEST_CASE_PROTOTYPE(tuple_init_1);
+TEST_CASE_PROTOTYPE(tuple_init_clean);
+TEST_CASE_PROTOTYPE(tuple_inspect);
+TEST_CASE_PROTOTYPE(tuple_new_1);
+TEST_CASE_PROTOTYPE(tuple_new_delete);
 
 void tuple_test ()
 {
diff --git a/test/types_test.c b/test/types_test.c
index 113ff23..7a98f91 100644
--- a/test/types_test.c
+++ b/test/types_test.c
@@ -14,7 +14,7 @@
 #include "test.h"
 
 void types_test ();
-void types_test_sizeof ();
+TEST_CASE_PROTOTYPE(types_sizeof);
 
 void types_test ()
 {