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

Function test_RGMatrixTupleIter_attach

tests/unit/test_rg_matrix_iter.c:34–54  ·  view source on GitHub ↗

test RGMatrixTupleIter initialization

Source from the content-addressed store, hash-verified

32
33// test RGMatrixTupleIter initialization
34void test_RGMatrixTupleIter_attach() {
35 RG_Matrix A = NULL;
36 GrB_Type t = GrB_UINT64;
37 GrB_Info info = GrB_SUCCESS;
38 GrB_Index nrows = 100;
39 GrB_Index ncols = 100;
40 RG_MatrixTupleIter iter;
41 memset(&iter, 0, sizeof(RG_MatrixTupleIter));
42
43 info = RG_Matrix_new(&A, t, nrows, ncols);
44 TEST_ASSERT(info == GrB_SUCCESS);
45
46 info = RG_MatrixTupleIter_attach(&iter, A);
47 TEST_ASSERT(RG_MatrixTupleIter_is_attached(&iter, A));
48
49 RG_MatrixTupleIter_detach(&iter);
50 TEST_ASSERT(iter.A == NULL);
51
52 RG_Matrix_free(&A);
53 TEST_ASSERT(A == NULL);
54}
55
56// test RGMatrixTupleIter iteration
57void test_RGMatrixTupleIter_next() {

Callers

nothing calls this directly

Calls 5

RG_Matrix_newFunction · 0.85
RG_Matrix_freeFunction · 0.85

Tested by

no test coverage detected