RyanJsonTest.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef __RyanJsonTest__
  2. #define __RyanJsonTest__
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <stdio.h>
  7. #include <stdint.h>
  8. #include <stdlib.h>
  9. #include <math.h>
  10. #include <time.h>
  11. #include <sys/stat.h>
  12. #include <dirent.h>
  13. #include <ctype.h>
  14. #include "valloc.h"
  15. #include "RyanJson.h"
  16. #include "RyanJsonUtils.h"
  17. #include "cJSON.h"
  18. #include "yyjson.h"
  19. #define getArraySize(arr) ((int32_t)(sizeof(arr) / sizeof((arr)[0])))
  20. #define checkMemory \
  21. do \
  22. { \
  23. int area = 0, use = 0; \
  24. v_mcheck(&area, &use); \
  25. if (area != 0 || use != 0) \
  26. { \
  27. RyanMqttLog_e("内存泄漏"); \
  28. while (1) \
  29. { \
  30. v_mcheck(&area, &use); \
  31. RyanMqttLog_e("|||----------->>> area = %d, size = %d", area, use); \
  32. delay(3000); \
  33. } \
  34. } \
  35. } while (0)
  36. // 定义枚举类型
  37. // 定义结构体类型
  38. /* extern variables-----------------------------------------------------------*/
  39. extern RyanJsonBool_e RyanJsonExample(void);
  40. extern RyanJsonBool_e RyanJsonBaseTest(void);
  41. extern RyanJsonBool_e RFC8259JsonTest(void);
  42. extern RyanJsonBool_e RyanJsonMemoryFootprintTest(void);
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif