lobophf / aimt

array index mapping tool for C language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.