Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

46 lines
1.5KB

  1. /* Arduino SdFat Library
  2. * Copyright (C) 2011 by William Greiman
  3. *
  4. * This file is part of the Arduino SdFat Library
  5. *
  6. * This Library is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (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
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with the Arduino SdFat Library. If not, see
  18. * <http://www.gnu.org/licenses/>.
  19. */
  20. #ifndef SdFatTestSuite_h
  21. #define SdFatTestSuite_h
  22. #include <SdFat.h>
  23. #include <SdFatUtil.h>
  24. #if defined(__arm__) && !defined(strcmp_P)
  25. #define strcmp_P(a, b) strcmp((a), (b))
  26. #endif // strcmp_P
  27. #if defined(__arm__) && !defined(strncpy_P)
  28. #define strncpy_P(s, t, n) strncpy(s, t, n)
  29. #endif // strncpy_P
  30. #if defined(__arm__) && !defined(strlen_P)
  31. #define strlen_P(str) strlen(str)
  32. #endif // strlen_P
  33. #define testVerifyBool(result) testVerify_P(result, PSTR(#result))
  34. #define testVerifyMsg(result, msg) testVerify_P(result, PSTR(msg))
  35. #define testVerifyStr(result, expect) testVerify_P(result, PSTR(expect))
  36. void testBegin();
  37. void testEnd();
  38. void testVerify_P(bool b, PGM_P msg);
  39. void testVerify_P(char* result, PGM_P expect);
  40. #endif // SdFatTestSuite_h