bkochuna / ners570f23-SpMV

1 stars 0 forks source link

Add construction/destruction tests for the COO matrix class #22

Open KyleVaughn opened 11 months ago

KyleVaughn commented 11 months ago

Description:

Test the constructor and destructor of the COO class. Test that:

  1. The constructor can create the class and assign the input matrix size to class variables
  2. The destruction function can delete the class object properly

Tasks:

Definition of done:

The unit test can check the COO class constructor and destructor and catch bugs if there's any.

KyleVaughn commented 11 months ago

Review by @MeetMPatel

MeetMPatel commented 11 months ago

Clear explanation of the issue and the task! 👍

MeetMPatel commented 10 months ago

Hi @Lazy-Beee, I am reviewing your tasks, but I am not sure where to look for in your contribution in the code. I went through your commits but was not able to figure out. Can you point me to your contribution?

Thank you.

sthvkbht commented 10 months ago

Hey @Lazy-Beee! I was looking through your tests and saw that your tests define nrows and ncols as size_t, while it is defined as const int (based on the stub code)

Lazy-Beee commented 10 months ago

Hi @Lazy-Beee, I am reviewing your tasks, but I am not sure where to look for in your contribution in the code. I went through your commits but was not able to figure out. Can you point me to your contribution?

Thank you.

I think you can directly go to the coo branch (or the coo pull request) and check the corresponding code. The commits are a complete mess.

MeetMPatel commented 10 months ago

Hey, got hold of the mess of commits and reviewed your contribution. 👍

Lazy-Beee commented 10 months ago

Hey @Lazy-Beee! I was looking through your tests and saw that your tests define nrows and ncols as size_t, while it is defined as const int (based on the stub code)

Thanks for your review. I am not sure whether you mean my tests in spmv/tests/COO_construction_test.cpp. I define the nrows and ncols variables as int to match the const int type of the constructor input. When I verify whether nrows and ncols are assigned correctly, I transform them into size_t using static_cast<size_t> because the accessor functions return size_t.