Esempio n. 1
0
int
test_main(int, char* [])
{
  test_zero_args();
  test_one_arg();
  test_signal_signal_connect();
  test_ref();
  test_default_combiner();
  test_extended_slot<void>();
  test_extended_slot<int>();
  return 0;
}
Esempio n. 2
0
int
main (int   argc,
      char *argv[])
{
	test_new ();
	test_alloc ();
	test_realloc ();
	test_free ();
	test_discard ();
	test_ref ();
	test_unref ();
	test_parent ();
	test_local ();

	return 0;
}
Esempio n. 3
0
/*!
 * \brief wrapper for ao2_iterator_next
 *
 * Grabs the next item in the container and replaces the ref acquired
 * from ao2_iterator_next() with a call to test_ref().
 */
static struct test_struct *test_iterator_next(struct ao2_iterator *iter)
{
    struct test_struct *test = ao2_iterator_next(iter);

    if (!test) {
        return NULL;
    }

    /* Remove ref from ao2_iterator_next() and replace it with
     * a test_ref() call. The order here is safe since we can guarantee
     * the container still has a ref to the test structure.
     */
    ao2_ref(test, -1);
    test_ref(test);

    return test;
}
Esempio n. 4
0
int main()
{
	test_ref();
	test_copy();
	return 0;
}