0
|
1 /*
|
|
2
|
|
3 Package: dyncall
|
|
4 Library: test
|
|
5 File: test/callback_suite/print.c
|
|
6 Description:
|
|
7 License:
|
|
8
|
281
|
9 Copyright (c) 2011-2018 Daniel Adler <dadler@uni-goettingen.de>,
|
0
|
10 Tassilo Philipp <tphilipp@potion-studios.com>
|
|
11
|
|
12 Permission to use, copy, modify, and distribute this software for any
|
|
13 purpose with or without fee is hereby granted, provided that the above
|
|
14 copyright notice and this permission notice appear in all copies.
|
|
15
|
|
16 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
17 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
18 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
19 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
20 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
21 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
23
|
|
24 */
|
|
25
|
|
26 #include "../common/platformInit.h"
|
|
27
|
|
28 void PrintUsage(const char* appName)
|
|
29 {
|
|
30 fprintf(stdout, "usage:\n\
|
|
31 %s [ -v ] [ from [to] ]\n\
|
|
32 where\n\
|
|
33 from, to: test range\n\
|
|
34 options\n\
|
|
35 -v verbose reports\n\
|
|
36 -h help on usage\n\
|
|
37 \n\
|
|
38 ", appName);
|
|
39 fflush(stdout);
|
|
40 }
|
|
41
|
|
42 void PrintHeader()
|
|
43 {
|
|
44 fprintf(stdout, "case\tsignat.\tresult\n");
|
|
45 }
|
|
46
|
|
47 void PrintCaseInfo(int caseId, const char* signatureString)
|
|
48 {
|
|
49 fprintf(stdout, "f%d(\t%s", caseId, signatureString);
|
|
50 fflush(stdout);
|
|
51 }
|
|
52
|
|
53 void PrintCaseResult(int resultId)
|
|
54 {
|
|
55 fprintf(stdout, " :%d\n", resultId);
|
|
56 fflush(stdout);
|
|
57 }
|
|
58
|
|
59 void PrintTotalResult(int resultId)
|
|
60 {
|
|
61 printf("result: callback_suite: %d\n", resultId);
|
|
62 fflush(stdout);
|
|
63 }
|
|
64
|