| 200 | } |
| 201 | |
| 202 | static bool td_project(cbm_test_declarations_t *declarations, yyjson_val *root) { |
| 203 | bool valid = true; |
| 204 | yyjson_val *impact = td_field(root, "test_impact", &valid); |
| 205 | if (!valid || !impact) |
| 206 | return valid; |
| 207 | yyjson_val *version = td_field(impact, "version", &valid); |
| 208 | yyjson_val *tests = td_field(impact, "tests", &valid); |
| 209 | if (!valid || !yyjson_is_uint(version) || yyjson_get_uint(version) != 1) |
| 210 | return false; |
| 211 | declarations->configured = true; |
| 212 | if (!tests) |
| 213 | return true; |
| 214 | yyjson_val *conventions = td_field(tests, "conventions", &valid); |
| 215 | yyjson_val *presets = td_field(tests, "presets", &valid); |
| 216 | if (!valid) |
| 217 | return false; |
| 218 | return (!conventions || td_conventions(declarations, conventions)) && |
| 219 | (!presets || td_presets(declarations, presets)); |
| 220 | } |
| 221 | |
| 222 | static void td_digest(cbm_test_declarations_t *declarations, const char *bytes, size_t len, |
| 223 | bool absent) { |
no test coverage detected