bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test framework; and what should be in 1.1.0


From: Federico Montesino Pouzols
Subject: Re: Test framework; and what should be in 1.1.0
Date: Fri, 17 Jan 2003 11:41:55 +0100
User-agent: Mutt/1.4i

On Fri, Jan 03, 2003 at 09:11:13PM +0200, Albert Strasheim wrote:
> >  * Orthodox performs a simple set of tests on an arbitary
> >  * class to make sure that it supports at least the
> >  * following operations:
> >  *
> >  *      default construction    - constructor
> >  *      equality/inequality     - operator== && operator!=
> >  *      assignment              - operator=
> >  *      negation                - operator!
> 
> I am quite surprised by this. I was looking over some of the Common C++ 
> documentation, and I couldn't figure out why everyone was including 
> operator! methods. To me negation doesn't mean much, except in specific 
> cases, and even then negating the return value of a "get" method would 
> probably be clearer in meaning. Or should negation generally return true 
> if something is "wrong" with the object?
> 

        Yes, for instance, you have the ! operator on InetAddress,
which tells you if the ip address is wrong. I find this operator very
nice for conditionals.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]