| 24 | } tm_source_t; |
| 25 | |
| 26 | static cbm_test_model_t *model_of(const tm_source_t *sources, int count) { |
| 27 | cbm_test_model_t *m = cbm_test_model_new(cbm_test_conventions_cbm()); |
| 28 | if (!m) { |
| 29 | return NULL; |
| 30 | } |
| 31 | for (int i = 0; i < count; i++) { |
| 32 | if (!cbm_test_model_add_source(m, sources[i].file, sources[i].text, |
| 33 | strlen(sources[i].text))) { |
| 34 | cbm_test_model_free(m); |
| 35 | return NULL; |
| 36 | } |
| 37 | } |
| 38 | if (!cbm_test_model_finish(m)) { |
| 39 | cbm_test_model_free(m); |
| 40 | return NULL; |
| 41 | } |
| 42 | return m; |
| 43 | } |
| 44 | |
| 45 | static const cbm_test_case_t *case_named(const cbm_test_model_t *m, const char *name) { |
| 46 | int n = 0; |
no test coverage detected