Make hint test check contents of buffer.
Add assertPrinted and assertNotPrinted helpers.