torture.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * libcsync -- a library to sync a directory with another
  3. *
  4. * Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #ifndef _TORTURE_H
  21. #define _TORTURE_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #include <stdarg.h> // NOLINT sometimes compiled in C mode
  26. #include <stddef.h> // NOLINT sometimes compiled in C mode
  27. #include <setjmp.h> // NOLINT sometimes compiled in C mode
  28. #include <cmocka.h>
  29. /* Used by main to communicate with parse_opt. */
  30. struct argument_s {
  31. char *args[2];
  32. int verbose;
  33. };
  34. void torture_cmdline_parse(int argc, char **argv, struct argument_s *arguments);
  35. int torture_csync_verbosity(void);
  36. /*
  37. * This function must be defined in every unit test file.
  38. */
  39. int torture_run_tests(void);
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif /* _TORTURE_H */