test_obj.c 373 B

1234567891011121314151617181920212223242526
  1. /**
  2. * This is a test for obj in $package$
  3. */
  4. #include "si_test.h"
  5. #include "obj.h"
  6. TEST_FUNC(obj) {
  7. void * object, * aid;
  8. object = obj_alloc(123, NULL);
  9. TEST_NOTNULL(object);
  10. TEST_NOTNULL(obj_ref(object));
  11. TEST_NOTNULL(obj_unref(object));
  12. TEST_NULL(obj_unref(object));
  13. TEST_DONE();
  14. }
  15. int main(void) {
  16. TEST_INIT();
  17. TEST_RUN(obj);
  18. TEST_REPORT();
  19. }