|
assertEquals("NaN", x, y, 0.0) where x=y=Double.NaN: msg#00153java.junit.user
Hi x and y are both simple double. Oughtn't assertEquals("x and y", x, y, 0.0) succeed when both x and y are Double.NaN? At the moment I'm having to make a situation specific assert statement when I expect y is Double.NaN. I'm having to write ... assertTrue("When y is NaN", Double.isNaN(y)); I know java returns false on (Double.NaN==y) even when y is Double.NaN, but for our assert statements I'd say it'd be more practical/general if assertEquals succeeded when both were NaN. Thanks Morten ======================================== Morten Grum PH-Consult Ordruphøjvej 4 2920 Charlottenlund Denmark Tel.: +45 39 96 22 08 Mob.: +45 40 93 43 84 Fax.: +45 39 63 02 72 Mail: mg@xxxxxx Web : www.phc.dk ========================================
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: distinguishing between failures and errors, neil_swingler |
|---|---|
| Next by Date: | RE: assertEquals("NaN", x, y, 0.0) where x=y=Double.NaN, Mark Meyers |
| Previous by Thread: | testing web application (jsp) with JavaScript, Vladimir Bilyov |
| Next by Thread: | Re: assertEquals("NaN", x, y, 0.0) where x=y=Double.NaN, kentlbeck |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |