Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Pre- and post- conditions (was Re: Coding style for small if statements) Date: Sat, 22 Feb 2020 00:01:43 -0800 Organization: A noiseless patient Spider Lines: 15 Message-ID: <86zhdbcaoo.fsf@linuxsc.com> References: <20200131234613.59047e037939ceb549b8e6d6@gmail.com> <65de5d07-838a-4a5f-bd70-b8a263fc61d6@googlegroups.com> <87imkkobdm.fsf@bsb.me.uk> <726b2209-ca7e-40fe-b429-fbc062f5b6bd@googlegroups.com> <874kw3nq6s.fsf@bsb.me.uk> <87k14ym0lg.fsf@bsb.me.uk> <875zggms21.fsf@bsb.me.uk> <87zhdrlqns.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="a1e79922b2c02e9149a52088916eaff2"; logging-data="23488"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+NKlnDpkUVjGzUxKlM4lv/Wob4wppCiv4=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:eDWDAMXEi7LlRyAWQ9Oqf586uvY= sha1:nzDLc7XwRHO+H9GQE4U3vaPdqf8= Xref: csiph.com comp.lang.c:150139 James Kuyper writes: > On 2/11/20 2:19 AM, Jorgen Grahn wrote: > ... > >> The thing I have against unit tests is that, for me, writing tests >> means I don't read the code as carefully. ... > > That makes just as much sense, for exactly the same reason, as "I don't > like washing my hands because it means that I don't feel a need to avoid > people who are coughing and sneezing, and then I end up catching their > colds." Whether the original statement is true or not, the analogy is flawed.