bkochuna / ners570f23-SpMV

1 stars 0 forks source link

Add construction/destruction tests for the ELL matrix class #24

Open KyleVaughn opened 11 months ago

KyleVaughn commented 11 months ago

Description:

Currently, our ELL matrix implementation lacks comprehensive unit tests for construction and destruction operations. These operations are fundamental to ensure the correct initialization and cleanup of ELL matrices. In order to maintain the robustness and reliability of ELL matrix implementation, add comprehensive construction and destruction tests. These tests will help ensure that the matrix is correctly constructed and properly destroyed, preventing potential memory leaks and resource management issues. Make sure to cover various scenarios, including edge cases and potential sources of errors. The primary goal is to verify that the ELL matrix is correctly initialized, populated, and safely deallocated.

Tasks:

  1. Construction Tests: Create a set of tests to validate the correct construction of ELL matrices under various conditions, including different matrix sizes, data types, and initialization methods. This will encompass both standard and edge cases.

    • [ ] Verify Initialization and Allocation: Test the creation of a simple ELL matrix with a few elements. Validate the behavior when invalid input data is provided during construction.
    • [ ] Matrix Creation from Existing Data: Verify that the matrix can be constructed from an existing data source, such as an array. Validate the behavior when invalid input data is provided during construction.
    • [ ] Verifying for Data types: Ensure that the tests cover a wide range of data types and configurations, as the ELL matrix may be used in diverse contexts.
    • [ ] Edge Cases: Test the matrix constructor with edge cases, such as empty matrices or matrices with a single element.
    • [ ] All scenarios: Create tests for extreme scenarios, such as very large matrices and matrices with a small number of elements.
  2. Destruction Tests: Develop tests to verify that the ELL matrices can be safely and completely destroyed without any memory leaks or resource issues.

    • [ ] Matrix Destruction: Ensure that the ELL matrix is properly deallocated and memory is released with a note that the matrix can be properly destroyed without memory leaks.
    • [ ] Create tests for extreme scenarios, such as very large matrices and matrices with a small number of elements.
  3. Integration Tests: Integrate the test suite into the project's continuous integration pipeline to ensure ongoing verification of construction and destruction operations.

    • [ ] Verify proper memory management during construction and destruction. Implement checks to ensure the integrity of the matrices after construction.
    • [ ] Integration Tests: Integrate the construction and destruction tests into our automated testing pipeline to regularly check for regressions.
    • [ ] Documentation Updates: Ensure that our documentation is updated to reflect the newly added tests, making it clear to developers and contributors how to run these tests and what to expect.

Definition of done:

KyleVaughn commented 11 months ago

Review by @rgrawe

rgrawe commented 11 months ago

Very thorough. All necessary tasks are addressed and discussed in detail.