tests.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. *
  4. * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
  5. * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  6. * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
  7. * *
  8. * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
  9. * by the Xiph.Org Foundation http://www.xiph.org/ *
  10. * *
  11. ********************************************************************
  12. function: common test utilities
  13. last mod: $Id$
  14. ********************************************************************/
  15. #include "config.h"
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18. #define INFO(str) \
  19. { printf ("---- %s ...\n", (str)); }
  20. #define WARN(str) \
  21. { printf ("%s:%d: warning: %s\n", __FILE__, __LINE__, (str)); }
  22. #define FAIL(str) \
  23. { printf ("%s:%d: %s\n", __FILE__, __LINE__, (str)); exit(1); }
  24. #undef MIN
  25. #define MIN(a,b) ((a)<(b)?(a):(b))