2012-04-10 02:12:46 -07:00
|
|
|
#include "Eobj.h"
|
2012-04-05 08:31:15 -07:00
|
|
|
#include "simple.h"
|
|
|
|
#include "mixin.h"
|
|
|
|
|
2012-04-19 01:52:11 -07:00
|
|
|
#include "../eunit_tests.h"
|
|
|
|
|
2012-04-05 08:31:15 -07:00
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
(void) argc;
|
|
|
|
(void) argv;
|
|
|
|
eobj_init();
|
|
|
|
|
|
|
|
Eobj *obj = eobj_add(SIMPLE_CLASS, NULL);
|
|
|
|
|
|
|
|
eobj_do(obj, SIMPLE_A_SET(1), SIMPLE_B_SET(2));
|
|
|
|
|
2012-04-19 01:52:11 -07:00
|
|
|
int a, b, sum = 0;
|
|
|
|
eobj_do(obj, SIMPLE_A_GET(&a), SIMPLE_B_GET(&b), MIXIN_AB_SUM_GET(&sum));
|
|
|
|
fail_if(sum != a + b + 2); /* 2 for the two mixins... */
|
2012-04-05 08:31:15 -07:00
|
|
|
|
|
|
|
eobj_unref(obj);
|
|
|
|
eobj_shutdown();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|