D - math2 unittest
- Sean L. Palmer (12/12) Jun 15 2002 Just noticed that the unittest for sign(extended) in math2.d is wrong (i...
- Pavel Minayev (4/6) Jun 16 2002 sign() is overloaded; you've missed declarations for int sign(int) and
- Sean L. Palmer (6/12) Jun 16 2002 There are 2 unit tests that test sign(long)
- Pavel Minayev (5/6) Jun 16 2002 Well, actually, appending an L at the end of a float constant
- Sean L. Palmer (7/13) Jun 16 2002 DOH
Just noticed that the unittest for sign(extended) in math2.d is wrong (it's testing long, not extended form) int sign(extended n) { return (n > 0 ? +1 : (n < 0 ? -1 : 0)); } unittest { assert(sign(0.0L) == 0); assert(sign(+123.456L) == +1); assert(sign(-123.456L) == -1); }
Jun 15 2002
On Sat, 15 Jun 2002 14:31:33 -0700 "Sean L. Palmer" <seanpalmer earthlink.net> wrote:Just noticed that the unittest for sign(extended) in math2.d is wrong (it's testing long, not extended form)sign() is overloaded; you've missed declarations for int sign(int) and int sign(long). =)
Jun 16 2002
There are 2 unit tests that test sign(long) Sean "Pavel Minayev" <evilone omen.ru> wrote in message news:CFN374234902009954 news.digitalmars.com...On Sat, 15 Jun 2002 14:31:33 -0700 "Sean L. Palmer"<seanpalmer earthlink.net>wrote:(it'sJust noticed that the unittest for sign(extended) in math2.d is wrongtesting long, not extended form)sign() is overloaded; you've missed declarations for int sign(int) and int sign(long). =)
Jun 16 2002
On Sun, 16 Jun 2002 03:44:48 -0700 "Sean L. Palmer" <seanpalmer earthlink.net> wrote:There are 2 unit tests that test sign(long)Well, actually, appending an L at the end of a float constant makes it extended - so 123.456L is an extended value, and it was sign(extended) version that was tested.
Jun 16 2002
DOH Not used to that yet. Must have overlooked the decimal. Of course you are correct. Sean "Pavel Minayev" <evilone omen.ru> wrote in message news:CFN374236174609143 news.digitalmars.com...On Sun, 16 Jun 2002 03:44:48 -0700 "Sean L. Palmer"<seanpalmer earthlink.net>wrote:There are 2 unit tests that test sign(long)Well, actually, appending an L at the end of a float constant makes it extended - so 123.456L is an extended value, and it was sign(extended) version that was tested.
Jun 16 2002