3 int i1() { return 42; }
4 int i2(void) { return 42; }
6 int splat(int a, int b, int c, int d, int e, int f) {
20 int proto1() { return 1024; }
22 int proto2(int a, int b);
23 int proto2(int a, int b) {
27 void proto3(int a, ...);
28 void proto3(int a, ...) {
36 void ___func___(void) {
37 expectstr(__func__, "___func___");
48 float funptr3(float a) {
52 int funptr4(int (*callback)(void), int *data) {
59 // nothing to see here
72 expecti(deref(&a), 1024);
73 expecti(proto1(), 1024);
74 expecti(proto2(512,512), 1024);
77 splat(1, 2, 3, 4, 5, 6);
82 // function pointer tests
83 int (*ptr1)(void) = funptr1;
84 int (*ptr2)(int) = funptr2;
85 float (*ptr3)(float) = funptr3;
86 int (*ptr4)(int(*)(void),int*) = funptr4;
88 expecti(ptr1(), 1024);
89 expecti(ptr2(a), 2048);
90 expecti(ptr4(ptr1,&a), 1024);
92 expectf(ptr3(3.14), 6.28);