When testing an invariant with message by actually failing it, I noticed that the invariant includes the source code for the message expression rather than its contents:
This negates the objective of
SERVER-31830, which was to print the actual variable contents. Also, rather than accepting a string, we probably should just accept arguments and dumping them as strings. Otherwise code use to build strings would be inactive untested code.
As this ticket shows, untested inactive code is likely to contain bugs.