| 1974 | } |
| 1975 | |
| 1976 | static bool application_index_args_equal(const char *left, const char *right) { |
| 1977 | if (!left || !right) { |
| 1978 | return false; |
| 1979 | } |
| 1980 | yyjson_doc *left_source = yyjson_read(left, strlen(left), 0); |
| 1981 | yyjson_doc *right_source = yyjson_read(right, strlen(right), 0); |
| 1982 | yyjson_mut_doc *left_copy = left_source ? yyjson_doc_mut_copy(left_source, NULL) : NULL; |
| 1983 | yyjson_mut_doc *right_copy = right_source ? yyjson_doc_mut_copy(right_source, NULL) : NULL; |
| 1984 | yyjson_mut_val *left_root = left_copy ? yyjson_mut_doc_get_root(left_copy) : NULL; |
| 1985 | yyjson_mut_val *right_root = right_copy ? yyjson_mut_doc_get_root(right_copy) : NULL; |
| 1986 | bool equal = application_index_args_normalize_defaults(left_root) && |
| 1987 | application_index_args_normalize_defaults(right_root) && |
| 1988 | application_index_args_fold_repo_path(left_copy) && |
| 1989 | application_index_args_fold_repo_path(right_copy) && |
| 1990 | yyjson_mut_equals(left_root, right_root); |
| 1991 | yyjson_mut_doc_free(left_copy); |
| 1992 | yyjson_mut_doc_free(right_copy); |
| 1993 | yyjson_doc_free(left_source); |
| 1994 | yyjson_doc_free(right_source); |
| 1995 | return equal; |
| 1996 | } |
| 1997 | |
| 1998 | bool cbm_daemon_application_index_args_equal_for_test(const char *left, const char *right) { |
| 1999 | return application_index_args_equal(left, right); |
no test coverage detected