Add an acid test to test the new algorithm against various special cases.