Test to check failure with CSC
| 107 | |
| 108 | // Test to check failure with CSC |
| 109 | TEST(SPARSE_CONVERT, CSC_ARG_ERROR) { |
| 110 | const int m = 100, n = 28, factor = 5; |
| 111 | |
| 112 | array A = cpu_randu<float>(dim4(m, n)); |
| 113 | |
| 114 | A = makeSparse<float>(A, factor); |
| 115 | |
| 116 | // Create Sparse Array of type src and dest From Dense |
| 117 | array sA = sparse(A, AF_STORAGE_CSR); |
| 118 | |
| 119 | // Convert src to dest format and dest to src |
| 120 | // Use C-API to catch error |
| 121 | af_array out = 0; |
| 122 | ASSERT_EQ(AF_ERR_ARG, af_sparse_convert_to(&out, sA.get(), AF_STORAGE_CSC)); |
| 123 | |
| 124 | if (out != 0) af_release_array(out); |
| 125 | } |
nothing calls this directly
no test coverage detected