At its core, the assert statement is a debugging aid for testing conditions that should remain true during your code’s normal execution. For assertions to work as a debugging tool, you should write them so that a failure indicates a bug in your code. In this section, you’ll learn how...
The inspection will warn about modification of variables and fields inside of the assert statement. The assert statement will also be reported if a method called by it modifies any fields.
Horn (2002) modifies this to identifythenon-asserted component. If something is asserted, it must stay in the scope offactives. In other words,if something is not asserted, it must scope out of factives.According to Horn’s analysis, which we follow, (35) entails (35i) while asserting(...