You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

44 lines
930 B

#include "lib_test.h"
#include <stdio.h>
#include <assert.h>
int main() {
printf("lib_test starting...\n");
{
printf("testing: func_V_args_V\n");
func_V_args_V();
}
{
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);
}
}