bkochuna / ners570f24-SpMV

3 stars 0 forks source link

Add tests for the ELL matvec method #20

Open KyleVaughn opened 1 month ago

KyleVaughn commented 1 month ago

Background:

Create unit tests for the matrix-vector multiplication method of the ELL matrix class. Unit tests are meant to confirm the correctness of code against data with a known and expected output. The ELL matvec multiplication method should receive an input array that contains the ELL format nonzero values from matrix A and output a solution array b from the multiplication of these values and a multiplication vector x.

Tasks:

Create a test that checks that the inputs are the correct size and contain the correct values. Create a test that checks that the output vector of the ELL matvec method matches the true solution of the linear system.

Definition of done:

The tests performed ensure that the ELL matvec method either outputs the correct solution vector or provides a false statement from the tests for all inputs.

dbloc-umich commented 1 month ago

I'm reviewing this

dbloc-umich commented 1 month ago

I'd say include a few simple and edge cases (empty matrix, a matrix of zeros or/ones, etc.) since those are easy to do tests on. Also there should be multiple tests just in case.