29#include "dbus/dbus-test-tap.h" 
   42static unsigned int failures = 0;
 
   43static unsigned int skipped = 0;
 
   44static unsigned int tap_test_counter = 0;
 
   50_dbus_test_fatal (
const char *format,
 
   55  printf (
"Bail out! ");
 
   56  va_start (ap, format);
 
   68_dbus_test_diag (
const char *format,
 
   74  va_start (ap, format);
 
   89_dbus_test_skip_all (
const char *format,
 
   96  printf (
"1..0 # SKIP - ");
 
   97  va_start (ap, format);
 
  110_dbus_test_ok (
const char *format,
 
  115  printf (
"ok %u - ", ++tap_test_counter);
 
  116  va_start (ap, format);
 
  117  vprintf (format, ap);
 
  128_dbus_test_not_ok (
const char *format,
 
  133  printf (
"not ok %u - ", ++tap_test_counter);
 
  134  va_start (ap, format);
 
  135  vprintf (format, ap);
 
  147_dbus_test_skip (
const char *format,
 
  152  printf (
"ok %u # SKIP ", ++tap_test_counter);
 
  154  va_start (ap, format);
 
  155  vprintf (format, ap);
 
  168_dbus_test_check_memleaks (
const char *test_name)
 
  170#ifdef DBUS_ENABLE_EMBEDDED_TESTS 
  173  if (_dbus_get_malloc_blocks_outstanding () == 0)
 
  175      printf (
"ok %u - %s did not leak memory\n", ++tap_test_counter,
 
  180      printf (
"not ok %u - %s leaked %d blocks\n",
 
  181          ++tap_test_counter, test_name,
 
  182          _dbus_get_malloc_blocks_outstanding ());
 
  187      "unable to determine whether %s leaked memory (not compiled " 
  188      "with memory instrumentation)",
 
  198_dbus_test_done_testing (
void)
 
  203    _dbus_test_diag (
"%u tests passed (%d skipped)",
 
  204                     tap_test_counter - skipped, skipped);
 
  206    _dbus_test_diag (
"%u/%u tests failed (%d skipped)",
 
  207                     failures, tap_test_counter - skipped, skipped);
 
  209  printf (
"1..%u\n", tap_test_counter);
 
#define _dbus_assert(condition)
Aborts with an error message if the condition is false.
void dbus_shutdown(void)
Frees all memory allocated internally by libdbus and reverses the effects of dbus_threads_init().