| 906 | } |
| 907 | |
| 908 | static bool cv2_test_inventory(cv2_context_t *ctx, cv2_span_t tests) { |
| 909 | size_t position = 0; |
| 910 | while (position < tests.length) { |
| 911 | cv2_span_t fields[4]; |
| 912 | int ids; |
| 913 | if (!cv2_step(ctx) || !cv2_row(ctx, tests, &position, true, fields)) |
| 914 | return false; |
| 915 | if (ctx->test_count == INT_MAX) |
| 916 | return cv2_fail(ctx, CBM_COVERAGE_PARSE_LIMIT); |
| 917 | ctx->test_count++; |
| 918 | if (!cv2_id_count(ctx, fields[3], &ids) || !cv2_items(ctx, 1) || |
| 919 | !cv2_items(ctx, (uint64_t)ids)) |
| 920 | return false; |
| 921 | } |
| 922 | return true; |
| 923 | } |
| 924 | |
| 925 | static bool cv2_prepare(cv2_context_t *ctx) { |
| 926 | ctx->map = cv2_array(ctx, 1, sizeof(*ctx->map)); |
no test coverage detected