Assertions
摘要
The assert macro part of the C standard library is a mechanism to aid in writing less buggy code. It allows you to “assert” that some condition must be true in order to continue. This chapter covers the assert macro, a sample implementation, assertions vs. errors and exceptions, use in production code, and advice for using assertions.