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

Function test_noPaths

tests/unit/test_all_paths.c:92–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void test_noPaths() {
93 Graph *g = BuildGraph();
94
95 NodeID src_id = 0;
96 unsigned int minLen = 999;
97 unsigned int maxLen = minLen + 1;
98
99 Node src;
100 Graph_GetNode(g, src_id, &src);
101
102 int relationships[] = {GRAPH_NO_RELATION};
103 AllPathsCtx *ctx = AllPathsCtx_New(&src, NULL, g, relationships, 1,
104 GRAPH_EDGE_DIR_OUTGOING, minLen, maxLen, NULL, NULL, 0, false);
105 Path *p = AllPathsCtx_NextPath(ctx);
106
107 TEST_ASSERT(p == NULL);
108
109 AllPathsCtx_Free(ctx);
110 Graph_Free(g);
111}
112
113void test_longest_Paths() {
114 Graph *g = BuildGraph();

Callers

nothing calls this directly

Calls 6

Graph_GetNodeFunction · 0.85
AllPathsCtx_NewFunction · 0.85
AllPathsCtx_NextPathFunction · 0.85
AllPathsCtx_FreeFunction · 0.85
Graph_FreeFunction · 0.85
BuildGraphFunction · 0.70

Tested by

no test coverage detected