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

Function test_unwind

tests/unit/test_referenced_entities.c:363–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361}
362
363void test_unwind() {
364 char *q = "UNWIND [1,2] as x";
365 AST *ast = buildAST(q);
366 uint *segmentIndices = getASTSegmentIndices(ast);
367 TEST_ASSERT(1 == array_len(segmentIndices));
368
369 AST *astSegment = AST_NewSegment(ast, 0, segmentIndices[0]);
370 TEST_ASSERT(0 == raxSize(astSegment->referenced_entities));
371 TEST_ASSERT(raxNotFound == raxFind(astSegment->referenced_entities, (unsigned char *)"x", 1));
372 array_free(segmentIndices);
373 AST_Free(astSegment);
374 AST_Free(ast);
375}
376
377void test_with() {
378 char *q = "MATCH (n),(m) WITH n as x RETURN x";

Callers

nothing calls this directly

Calls 6

buildASTFunction · 0.85
getASTSegmentIndicesFunction · 0.85
array_lenFunction · 0.85
AST_NewSegmentFunction · 0.85
array_freeFunction · 0.85
AST_FreeFunction · 0.85

Tested by

no test coverage detected