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

Function setup

tests/unit/test_algebraic_expression.c:310–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310void setup() {
311 // Use the malloc family for allocations
312 Alloc_Reset();
313
314 // Initialize the thread pool.
315 TEST_ASSERT(ThreadPools_CreatePools(1, 1, 2));
316
317 // Initialize GraphBLAS.
318 GrB_Info info;
319 info = GrB_init(GrB_NONBLOCKING);
320 TEST_ASSERT(info == GrB_SUCCESS);
321
322 // all matrices in CSR format
323 info = GxB_set(GxB_FORMAT, GxB_BY_ROW);
324 TEST_ASSERT(info == GrB_SUCCESS);
325
326 // Create a graph
327 _fake_graph_context();
328 _build_graph();
329 _bind_matrices();
330
331 qg = QueryGraph_New(16, 16);
332}
333
334void tearDown() {
335 TEST_ASSERT(GrB_finalize() == GrB_SUCCESS);

Callers

nothing calls this directly

Calls 7

Alloc_ResetFunction · 0.85
ThreadPools_CreatePoolsFunction · 0.85
GrB_initFunction · 0.85
_build_graphFunction · 0.85
_bind_matricesFunction · 0.85
QueryGraph_NewFunction · 0.85
_fake_graph_contextFunction · 0.70

Tested by

no test coverage detected