| 923 | } |
| 924 | |
| 925 | static bool cv2_prepare(cv2_context_t *ctx) { |
| 926 | ctx->map = cv2_array(ctx, 1, sizeof(*ctx->map)); |
| 927 | if (!ctx->map) |
| 928 | return false; |
| 929 | ctx->map->format = CBM_COVERAGE_FORMAT_PROFILES; |
| 930 | ctx->map->function_count = ctx->profile_count; |
| 931 | ctx->map->test_count = ctx->test_count; |
| 932 | ctx->map->profile_binding = ctx->binding; |
| 933 | ctx->map->profiles = cv2_array(ctx, (size_t)ctx->profile_count, sizeof(*ctx->map->profiles)); |
| 934 | ctx->map->tests = cv2_array(ctx, (size_t)ctx->test_count, sizeof(*ctx->map->tests)); |
| 935 | return ctx->status == CBM_COVERAGE_PARSE_OK; |
| 936 | } |
| 937 | |
| 938 | static bool cv2_name(cv2_context_t *ctx, cv2_span_t span, cbm_coverage_profile_t *row) { |
| 939 | if (!span.length || (span.length & 1)) |
no test coverage detected