testBase.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. extern void testChangeRunner(void);
  29. extern void testCompareRunner(void);
  30. extern void testCreateRunner(void);
  31. extern void testDeleteRunner(void);
  32. extern void testDetachRunner(void);
  33. extern void testDuplicateRunner(void);
  34. extern void testForEachRunner(void);
  35. extern void testLoadSuccessRunner(void);
  36. extern void testLoadFailureRunner(void);
  37. extern void testReplaceRunner(void);
  38. extern void testPrintRunner(void);
  39. extern void testMemoryRunner(void);
  40. extern void testDeepRecursionRunner(void);
  41. extern void testEqualityBoolRunner(void);
  42. extern void testEqualityDoubleRunner(void);
  43. extern void testEqualityIntRunner(void);
  44. extern void testEqualityStringRunner(void);
  45. extern void testUtilsRunner(void);
  46. extern void testRobustRunner(void);
  47. extern void testStressRunner(void);
  48. extern void testRfc8259Runner(void);
  49. #ifdef __cplusplus
  50. }
  51. #endif
  52. #endif