bkochuna / ners570f23-SpMV

1 stars 0 forks source link

Add CSR accessor tests #48

Open KyleVaughn opened 11 months ago

KyleVaughn commented 11 months ago

Description: Write a bunch of tests to the library to be able to get information about matrices in the CSR format.

These functions should be able to obtain information on the CSR matrix format specifically. These tests are necessary to ensure proper implementation of accessor function to be used in other CSR matrix operations.

Tasks: The following tests are needed:

Test the implementation can return the number of rows for a CSR format matrix Test the implementation can return the number of columns for a CSR format matrix Test the implementation can return the element value at given row and column index values for a matrix in the CSR format from the original file source Test the implementation can return an element value at given row and column index values for a matrix in the CSR format from the class object created Test the implementation can return a "CSR" label for matrices in the CSR format Test that the filename of the CSR s returned correctly. Match strings. Test the number of nonzero entries in the martix. Integer match. Return a state of the matrix in CSR. How to write the test case TBD.

For all the above tests include error message when tests fail.

Definition of done: Write all the test cases.

Pass the Test for the implementation of printing correct number of rows for a CSR format matrix Pass the Test for the implementation of printing the number of columns for a CSR format matrix Pass the Test for the implementation by printing the correct element value at given row and column index values from original source file. Pass the Test for the implementation by checking the element value at given row and column index values is correct by doing a float/double comparison with the original source file value at the same location. Pass the Test for the implementation by printing a "CSR" label for matrices in the CSR format Pass the Test for the implementation by printing the filename of the CSR matrix correctly. Alternatively one can compare strings with given input string from command line. Depends on user. Pass the Test for the implementation of printing the correct number of nonzero entries in the martix. Pass the Test for the implementation of printing the a state of the matrix in CSR. How to write the test case TBD.

KyleVaughn commented 11 months ago

Review by @zkjiaumich

zkjiaumich commented 11 months ago

In your description, I think you may explain a bit more on why you need this test.

In your tasks, it would be better if you could include the error messages when the tests fail.

In the definition of done, you may elaborate more on when your tests are done successfully. For example, this can be verified by whether the tests print desired messages in the pass and fail cases.