[Mono-list] [PATCH] BitVector32
Andrew Birkett
adb@tardis.ed.ac.uk
Mon, 24 Jun 2002 12:21:01 +0100 (BST)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---559023410-851401618-1024917661=:19519
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi,
I've got a few mono patches lined up today. I did a big cycle ride on
Saturday and didn't want to move on Sunday so I got lots of coding done!
I've attached a further patch for BitVector32, created against the current
cvs version. The patch contains:
- Unit test for section indexers
- Check for >32 bits when creating sections
- Factored out helper methods for bit twiddling operations.
- Removed ^M's from BitVector32Test.cs
Unit tests pass, except those which were already broken prior to my
changes. The failures are all in date/time classes, due to me being in
the GMT time zone. I'll have a look at fixing those later.
Andrew
- www.tardis.ed.ac.uk/~adb -
---559023410-851401618-1024917661=:19519
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=bitvector-patch
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GS4.4.33.0206241221010.19519@davros.tardis.ed.ac.uk>
Content-Description:
Content-Disposition: attachment; filename=bitvector-patch
SW5kZXg6IFN5c3RlbS9TeXN0ZW0uQ29sbGVjdGlvbnMuU3BlY2lhbGl6ZWQv
Qml0VmVjdG9yMzIuY3MNCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NClJDUyBm
aWxlOiAvbW9uby9tY3MvY2xhc3MvU3lzdGVtL1N5c3RlbS5Db2xsZWN0aW9u
cy5TcGVjaWFsaXplZC9CaXRWZWN0b3IzMi5jcyx2DQpyZXRyaWV2aW5nIHJl
dmlzaW9uIDEuNQ0KZGlmZiAtdSAtcjEuNSBCaXRWZWN0b3IzMi5jcw0KLS0t
IFN5c3RlbS9TeXN0ZW0uQ29sbGVjdGlvbnMuU3BlY2lhbGl6ZWQvQml0VmVj
dG9yMzIuY3MJMjEgSnVuIDIwMDIgMTg6MTI6MDM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