MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / atlas_history_test_commit

Function atlas_history_test_commit

tests/test_ui.c:2368–2379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2366}
2367
2368static bool atlas_history_test_commit(const char *json, const char *array, const char *subject) {
2369 yyjson_doc *doc = json ? yyjson_read(json, strlen(json), 0) : NULL;
2370 if (!doc)
2371 return false;
2372 yyjson_val *root = yyjson_doc_get_root(doc);
2373 yyjson_val *commits = yyjson_obj_get(root, array);
2374 const char *got = yyjson_get_str(yyjson_obj_get(yyjson_arr_get(commits, 0), "subject"));
2375 bool matches = yyjson_get_bool(yyjson_obj_get(root, "available")) &&
2376 yyjson_arr_size(commits) == 1 && got && strcmp(got, subject) == 0;
2377 yyjson_doc_free(doc);
2378 return matches;
2379}
2380
2381static bool atlas_history_test_remote(const char *json, const char *expected) {
2382 yyjson_doc *doc = json ? yyjson_read(json, strlen(json), 0) : NULL;

Callers 1

test_ui.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected