This goal of this issue is to implement unit tests to evaluate the functionality of constructor and destructor methods for the COO class. Constructors serve the role of making an instance of a class, often given user input. They should parse that input and create an object with key variables set. For the COO class, the inputs would be the matrix dimensions and the precision for the matrix's data. The unit tests should verify this functionality. Destructors serve to remove an instance of an object from memory and are important to avoid memory leaks. The unit tests should verify that the object is removed from memory.
Tasks:
[ ] Discuss with others how precision will be implemented, at the template level, or as an input to the constructor. This task blocks the completion of all the following tasks.
[ ] Discuss with others what data types will be used for indices
[ ] Write a unit test checking that the constructor successfully made an object
[ ] Write unit tests checking that all inputs to the matrix constructor are correctly set in the object that is created. Write a unit test giving a sample input and checking that the following are correct in the new object:
Number of rows
Number of columns
Data type of the matrix's values
Data type of indices (I,J vectors)
[ ] Write a unit test creating a COO matrix and checking that the matrix is no longer in memory after the destructor has been called
Definition of done:
Unit tests are written to evaluate: whether the constructor makes an object, whether input data to the constructor is correctly reflected in the created object, and whether the destructor removes the object from memory.
Description:
This goal of this issue is to implement unit tests to evaluate the functionality of constructor and destructor methods for the COO class. Constructors serve the role of making an instance of a class, often given user input. They should parse that input and create an object with key variables set. For the COO class, the inputs would be the matrix dimensions and the precision for the matrix's data. The unit tests should verify this functionality. Destructors serve to remove an instance of an object from memory and are important to avoid memory leaks. The unit tests should verify that the object is removed from memory.
Tasks:
Definition of done:
Unit tests are written to evaluate: whether the constructor makes an object, whether input data to the constructor is correctly reflected in the created object, and whether the destructor removes the object from memory.