6 #define RUN(s, stuff) do { \
11 #define RUNCHECK(s, stuff) do { \
13 assert((int)(*obj)->s stuff == 1); \
19 printf("C++ object in C:\n");
21 IObject
*o
= (IObject
*)1;
24 const char *str
= (const char *)1;
26 ITest
*obj
= get_cppobj();
30 RUNCHECK(objret
, (obj
));
31 RUNCHECK(intret
, (obj
));
32 RUNCHECK(boolret
, (obj
));
33 RUNCHECK(strret
, (obj
));
35 RUN(objparm
, (obj
, o
, &o
, &o
));
36 RUN(intparm
, (obj
, i
, &i
, &i
));
37 RUN(intparm_simple
, (obj
, i
));
38 RUN(boolparm
, (obj
, b
, &b
, &b
));
39 RUN(strparm
, (obj
, str
, &str
, &str
));