[lang] Adjustment to BitField

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[lang] Adjustment to BitField

Steven Caswell
While looking at the coverage of test cases, I noticed the following
in the BitField class:

If I create a BitField with a mask of 0, then invoke isAllSet(0), the
return value is true, instead of false as I expected. Is there any
particular reason the method should behave this way, or should it
indeed return false?

TIA
--
Steven Caswell
[hidden email]

Take back the web - http://www.mozilla.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: [lang] Adjustment to BitField

James Carman
Wouldn't that be vacuously true?  You have a BitField with no bits set and
you're asking if it has all of the same bits set as an integer (0) which has
no bits set.  

-----Original Message-----
From: Steven Caswell [mailto:[hidden email]]
Sent: Monday, July 04, 2005 5:32 PM
To: Jakarta Commons Developers List
Subject: [lang] Adjustment to BitField

While looking at the coverage of test cases, I noticed the following
in the BitField class:

If I create a BitField with a mask of 0, then invoke isAllSet(0), the
return value is true, instead of false as I expected. Is there any
particular reason the method should behave this way, or should it
indeed return false?

TIA
--
Steven Caswell
[hidden email]

Take back the web - http://www.mozilla.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]