testBase.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef RYANJSON_TEST_BASE_H
  2. #define RYANJSON_TEST_BASE_H
  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 "RyanJson.h"
  12. #include "RyanJsonInternal.h"
  13. #include "cJSON.h"
  14. #include "valloc.h"
  15. #include "testCommon.h"
  16. #undef jsonLog
  17. #define jsonLog(fmt, ...) testLog("%s:%d " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
  18. // 定义枚举类型
  19. // 定义结构体类型
  20. /* extern variables-----------------------------------------------------------*/
  21. extern void printJsonDebug(RyanJson_t json);
  22. extern void rootNodeCheckTest(RyanJson_t json);
  23. extern void itemNodeCheckTest(RyanJson_t json);
  24. extern void arrayNodeCheckTest(RyanJson_t json, RyanJsonBool_e isReversed);
  25. extern void arrayItemNodeCheckTest(RyanJson_t json);
  26. extern void testCheckRoot(RyanJson_t pJson);
  27. extern void testCheckRootEx(RyanJson_t pJson, RyanJsonBool_e isReversed);
  28. #define UNITY_TEST_LIST_ENTRY(name) extern void name(void);
  29. #include "../runner/test_list.inc"
  30. #undef UNITY_TEST_LIST_ENTRY
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif