Add more tests (Google test library)
lobophf opened this issue · comments
The tests that have already written cover only a few cases. That is, those where the user enters correct values in the sub2ind and ind2sub functions. However, the code remains fragile because values outside of ranges have not yet been considered. Therefore, the following list of unit tests is crucial.
- Add unit tests to sub2ind by predicting errors invoked by the inspectSubscripts function.
- Add unit tests to ind2sub by predicting errors invoked by the inspectIndex function.
- Add unit tests to prevent the index from being great than the maximum integer possible.