No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

51 líneas
1.9KB

  1. /**
  2. * Copyright (c) 20011-2017 Bill Greiman
  3. * This file is part of the SdFat library for SD memory cards.
  4. *
  5. * MIT License
  6. *
  7. * Permission is hereby granted, free of charge, to any person obtaining a
  8. * copy of this software and associated documentation files (the "Software"),
  9. * to deal in the Software without restriction, including without limitation
  10. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  11. * and/or sell copies of the Software, and to permit persons to whom the
  12. * Software is furnished to do so, subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice shall be included
  15. * in all copies or substantial portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  18. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  23. * DEALINGS IN THE SOFTWARE.
  24. */
  25. #ifndef SdFatTestSuite_h
  26. #define SdFatTestSuite_h
  27. #include "SdFat.h"
  28. #include "FreeStack.h"
  29. #if defined(__arm__) && !defined(strcmp_P)
  30. #define strcmp_P(a, b) strcmp((a), (b))
  31. #endif // strcmp_P
  32. #if defined(__arm__) && !defined(strncpy_P)
  33. #define strncpy_P(s, t, n) strncpy(s, t, n)
  34. #endif // strncpy_P
  35. #if defined(__arm__) && !defined(strlen_P)
  36. #define strlen_P(str) strlen(str)
  37. #endif // strlen_P
  38. #define testVerifyBool(result) testVerify_P(result, PSTR(#result))
  39. #define testVerifyMsg(result, msg) testVerify_P(result, PSTR(msg))
  40. #define testVerifyStr(result, expect) testVerify_P(result, PSTR(expect))
  41. void testBegin();
  42. void testEnd();
  43. void testVerify_P(bool b, PGM_P msg);
  44. void testVerify_P(char* result, PGM_P expect);
  45. #endif // SdFatTestSuite_h