test RGMatrixTupleIter initialization
| 32 | |
| 33 | // test RGMatrixTupleIter initialization |
| 34 | void 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 |
| 57 | void test_RGMatrixTupleIter_next() { |
nothing calls this directly
no test coverage detected