1 /* use 0 for NULL so no need for system header */
3 int test_c_assoc_0(void *my_c_ptr);
4 int test_c_assoc_1(void *my_c_ptr_1, void *my_c_ptr_2);
5 int test_c_assoc_2(void *my_c_ptr_1, void *my_c_ptr_2, int num_ptrs);
6 void verify_assoc(void *my_c_ptr_1, void *my_c_ptr_2);
8 extern void abort(void);
10 int main(int argc, char **argv)
15 if(test_c_assoc_0(0) != 0)
18 if(test_c_assoc_0(&i) != 1)
21 if(test_c_assoc_1(0, 0) != 0)
24 if(test_c_assoc_1(0, &i) != 0)
27 if(test_c_assoc_1(&i, &i) != 1)
30 if(test_c_assoc_1(&i, 0) != 0)
33 if(test_c_assoc_1(&i, &j) != 0)
36 /* this should be associated, cause only testing 1 ptr (i) */
37 if(test_c_assoc_2(&i, 0, 1) != 1)
40 /* this should be associated */
41 if(test_c_assoc_2(&i, &i, 2) != 1)
44 /* this should not be associated (i) */
45 if(test_c_assoc_2(&i, &j, 2) != 0)
48 /* this should be associated, cause only testing 1 ptr (i) */
49 if(test_c_assoc_2(&i, &j, 1) != 1)