blitz_coverage.h 1021 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef BLITZ_COVERAGE_H
  2. #define BLITZ_COVERAGE_H
  3. #ifdef BMX_COVERAGE
  4. #include "hashmap/hashmap.h"
  5. typedef struct {
  6. const char* file;
  7. int line;
  8. int count;
  9. } BBCoverageLineExecInfo;
  10. typedef struct {
  11. const char* file;
  12. const char* func;
  13. int line;
  14. int count;
  15. } BBCoverageFuncExecInfo;
  16. typedef struct {
  17. const char* func;
  18. int line;
  19. } BBCoverageFunctionInfo;
  20. typedef struct {
  21. const char* filename;
  22. const int* coverage_lines;
  23. size_t coverage_lines_count;
  24. void* line_map;
  25. const BBCoverageFunctionInfo* coverage_functions;
  26. size_t coverage_functions_count;
  27. void* func_map;
  28. } BBCoverageFileInfo;
  29. extern BBString * bbCoverageOutputFileName;
  30. void bbCoverageStartup();
  31. void bbCoverageRegisterFile(BBCoverageFileInfo * coverage_files);
  32. void bbCoverageUpdateLineInfo(const char* file, int line);
  33. void bbCoverageUpdateFunctionLineInfo(const char* file, const char* func, int line);
  34. void bbCoverageGenerateOutput();
  35. #endif // BMX_COVERAGE
  36. #endif // BLITZ_COVERAGE_H