Al Chou wrote:
--- Phil Steitz <[EMAIL PROTECTED]> wrote:

Al Chou wrote:

--- Brent Worden <[EMAIL PROTECTED]> wrote:

-----Original Message-----
From: Phil Steitz [mailto:[EMAIL PROTECTED]
Sent: Friday, June 06, 2003 12:21 PM

[deletia]

Something similar to JUnit's assertEquals(double expected, double actual,
double epsilon).

This is a good idea.


Is JUnit's license (http://www.opensource.org/licenses/ibmpl.php) Apache
compatible?


I think that Brent is talking about defining a new function called something like approximatelyEquals() that returned a boolean. The signature, semantics and implementation of this would be different from JUnit.


Ah, OK. That could be useful indeed.



Simple methods like isPositive, isNegative, etc. can be used to make

boolean

expressions more human readable.


I'm willing to build those two on top of sign (I'm so generous with my

coding


time, eh? <g>). Are those two sufficient? sign treats 0 as positive,

which


may not be desirable.


+1 (especially the part about your time :-)


OK, I'll TDD those up, hopefully resolving the question of what to do about the
sign of 0 in the process.

Forgot to weigh in on this. I would say that 0 is neither positive nor negative. If that is not a happy state, I would prefer to call isPositive, "isNonNegative". I know that is ugly, I have a hard time calling 0 a positive number. So, my first should would be isPositive and isNegative both fail for zero, second would be to rename as above.



Al

=====
Albert Davidson Chou

Get answers to Mac questions at http://www.Mac-Mgrs.org/ .

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to