3.23 Testing Pointer Code
Pointer code should be tested by checking structure, not only values. A linked list can contain the right values while still having broken links, accidental cycles, stale tails, or shared nodes that should have been detached. Good tests therefore verify both the sequence and the shape of the list. Problem You want to test linked list algorithms such as insertion, deletion, reversal, splitting, merging, and LRU operations. A weak test...