MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / validate_query_plans_clone

Function validate_query_plans_clone

tests/unit/test_execution_plan_clone.c:78–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78static void validate_query_plans_clone
79(
80 const char **queries
81) {
82 uint query_count = array_len(queries);
83 for(uint i = 0; i < query_count; i++) {
84 AST *ast = NULL;
85 ExecutionPlan *plan = NULL;
86 const char *query = queries[i];
87
88 build_ast_and_plan(query, &ast, &plan);
89 TEST_ASSERT(ast != NULL);
90 TEST_ASSERT(plan != NULL);
91
92 ExecutionPlan *clone = ExecutionPlan_Clone(plan);
93 ExecutionPlan_OpsEqual(plan, clone, plan->root, clone->root);
94
95 AST_Free(ast);
96 ExecutionPlan_Free(clone);
97 ExecutionPlan_Free(plan);
98 }
99}
100
101void setup() {
102 // skip if memory sanitizer is enabled

Callers 12

test_createClauseFunction · 0.85
test_matchClauseFunction · 0.85
test_updateClauseFunction · 0.85
test_deleteClauseFunction · 0.85
test_mergeClauseFunction · 0.85
test_cartesProductFunction · 0.85
test_skipLimitSortFunction · 0.85
test_optionalMatchFunction · 0.85
test_procCallFunction · 0.85
test_unwindFunction · 0.85
test_withFunction · 0.85
test_unionFunction · 0.85

Calls 6

array_lenFunction · 0.85
build_ast_and_planFunction · 0.85
ExecutionPlan_CloneFunction · 0.85
ExecutionPlan_OpsEqualFunction · 0.85
AST_FreeFunction · 0.85
ExecutionPlan_FreeFunction · 0.85

Tested by

no test coverage detected