From: Florian Gross Date: 2004-11-18T09:53:15+09:00 Subject: Re: assert Gavin Sinclair wrote: >>Problem with using assert() for the method name is that test/unit >>already uses it for stating what a test ought to produce. It seems >>likely that you will have test/unit style assert()s and breakpoint style >>assert()s (which I'd like to call assumptions) in the same code base. > > And they are completely different things, so should not be toggled > from one to the other with a global switch. A typical test case will > have dozens or hundreds of asserts, but only one or two breakpoints. > And the breakpoints are very temporary; once you've worked out what's > going on, you remove them. > > Testing and debugging are very different. I agree with you here though I think it can still make sense to toggle between different implementations of assume(). For example it might be a good idea to log the failed assumption into a warning log file for production applications and so on.