
5 changed files with 78 additions and 32 deletions
@ -1,13 +1,44 @@ |
|||||
#include "lib_test.h" |
#include "lib_test.h" |
||||
#include <stdio.h> |
#include <stdio.h> |
||||
|
#include <assert.h> |
||||
|
|
||||
|
|
||||
int main() { |
int main() { |
||||
printf("lib_test starting...\n"); |
printf("lib_test starting...\n"); |
||||
|
|
||||
|
{ |
||||
TT_HHS a; |
printf("testing: func_V_args_V\n"); |
||||
|
func_V_args_V(); |
||||
TT_CCS b; |
} |
||||
// printf("%i, %i\n", a.x, a.y);
|
{ |
||||
|
printf("testing: func_P_args_V\n"); |
||||
|
int ret = func_P_args_V(); |
||||
|
assert(ret == 23); |
||||
|
} |
||||
|
{ |
||||
|
printf("testing: func_V_args_P\n"); |
||||
|
func_V_args_P(23); |
||||
|
} |
||||
|
{ |
||||
|
printf("testing: func_P_args_P\n"); |
||||
|
int ret = func_P_args_P(22); |
||||
|
assert(ret == 23); |
||||
|
} |
||||
|
{ |
||||
|
printf("testing: func_V_args_pP\n"); |
||||
|
unsigned int i = 22; |
||||
|
func_V_args_pP(&i); |
||||
|
assert(i == 23); |
||||
|
} |
||||
|
{ |
||||
|
printf("testing: func_P_args_P_pP_pP\n"); |
||||
|
int i = 23; |
||||
|
int j = 22; |
||||
|
int k = 22; |
||||
|
int ret = func_P_args_P_pP_pP(i,&j,&k); |
||||
|
assert(ret == 23); |
||||
|
assert(i == 23); |
||||
|
assert(j == 23); |
||||
|
assert(k == 23); |
||||
|
} |
||||
} |
} |
||||
|
Loading…
Reference in new issue