Adjustments to testcase() macros for improved testability.
Fix compiler warnings.  Fix a harmless off-by-one error in the solver.