Mercurial > pub > dyncall > dyncall
comparison test/callback_suite/do_test.c @ 410:7608e34098b0
- cleanups, simplifications, some api clarification, ...
- test cases consistency:
* return status code depending on test results (for actual conformance tests, not stuff that is not an example or hack to check something, ..)
* platform init helper added for some
author | Tassilo Philipp |
---|---|
date | Tue, 05 Oct 2021 21:53:04 +0200 |
parents | f5577f6bf97a |
children | d8f0e6cecdab |
comparison
equal
deleted
inserted
replaced
409:15698dc0cba3 | 410:7608e34098b0 |
---|---|
28 #include "invokers.h" | 28 #include "invokers.h" |
29 #include "dyncall_callback.h" | 29 #include "dyncall_callback.h" |
30 #include "sigstrings.h" | 30 #include "sigstrings.h" |
31 #include "signature_utils.h" | 31 #include "signature_utils.h" |
32 #include "env.h" | 32 #include "env.h" |
33 #include "print.h" | |
34 #include "../common/platformInit.h" | 33 #include "../common/platformInit.h" |
35 | 34 |
36 int CompareValues(char type, DCValue* a, DCValue* b) | 35 int CompareValues(char type, DCValue* a, DCValue* b) |
37 { | 36 { |
38 int isequal = 0; | 37 int isequal = 0; |
113 | 112 |
114 assert( id > 0 && id <= CONFIG_NSIGS ); | 113 assert( id > 0 && id <= CONFIG_NSIGS ); |
115 index = id - 1; | 114 index = id - 1; |
116 | 115 |
117 signature = GetSignature(index); | 116 signature = GetSignature(index); |
118 PrintCaseInfo(id,signature); | 117 printf("f%d(\t%s", id, signature); |
119 | 118 |
120 pcb = dcbNewCallback( signature, handler, (void*) signature ); | 119 pcb = dcbNewCallback( signature, handler, (void*) signature ); |
121 assert(pcb != NULL); | 120 assert(pcb != NULL); |
122 DoInvoke(index, (void*) pcb); | 121 DoInvoke(index, (void*) pcb); |
123 result = Compare(signature); | 122 result = Compare(signature); |
124 PrintCaseResult(result); | 123 printf(" :%d\n", result); |
125 dcbFreeCallback(pcb); | 124 dcbFreeCallback(pcb); |
126 return result; | 125 return result; |
127 } | 126 } |
128 | 127 |