Introduce an assertion macro for checking expected values, and include bug check messages in crash reports.