In my application I have an ADT with 9 leaf level classes.
The classes implement several methods to define the interaction between the different leaf class.
This means there are lots of special cases.
For each special case, I try to have at least one (if not multiple) test cases to cover that special case.
Is there a convention to associating some lines of code with a particluar test case and vice versa.
I.e., when I (or someone else) looks at the test case, I might like to know, which special case is this testing exactly? And when I look at a piece of code, I might like to know which test case covers it.
If I relate them by line number, of course that would be bad, as line numbers change.
I’ve thought about just putting comments like
;; Case 1121 and
;; test for Case 1121.
Is there a better way?