#include <pulsecore/macro.h>
#include <stdio.h>

void pa_log_levelv_meta(
			pa_log_level_t level,
			const char*file,
			int line,
			const char *func,
			const char *format,
			va_list ap) {
  printf ("in pa_log_levelv_meta\n");

  return;
}

int returns_zero ()
{
  return 0;
}

int main (int argc, char** argv)
{
  int ret;

  printf ("PA_UNLIKELY (returns_zero() == 0)\n");
  ret = PA_UNLIKELY (returns_zero() == 0);
  printf ("returned %d\n\n", ret);

  printf ("__builtin_expect (!! (returns_zero() == 0), 0);\n");
  ret = __builtin_expect (!! (returns_zero() == 0), 0);
  printf ("returned %d\n\n", ret);

  printf (" pa_assert_se (returns_zero() == 0);\n");
  pa_assert_se (returns_zero() == 0);
  printf ("survived assertion\n\n");

  printf ("  pa_assert_se (returns_zero() != 0); /* should die here */\n");
  pa_assert_se (returns_zero() != 0);

}
