Thinking in C++ Vol 2 - Practical Programming |
Prev |
Home |
Next |
Much of the headache of software engineering can be avoided
by being deliberate about what you re doing. You ve probably been using mental
assertions as you ve crafted your loops and functions, even if you haven t
routinely used the assert( ) macro. If you ll use assert( ),
you ll find logic errors sooner and end up with more readable code as well.
Remember to only use assertions for invariants, though, and not for runtime
error handling.
Nothing will give you more peace of mind than thoroughly
tested code. If it s been a hassle for you in the past, use an automated
framework, such as the one we ve presented here, to integrate routine testing
into your daily work. You (and your users!) will be glad you did.
Thinking in C++ Vol 2 - Practical Programming |
Prev |
Home |
Next |