[Mono-list] BitArrayTest fails in TestByteConstructor

Nick Drochak ndrochak@gol.com
Sun, 4 Nov 2001 18:59:00 +0900


David,

BitArrayTest is failing in TestByteConstructor.  For the life of me, I
can't figure out why.  I've traced through the code, and when I do, none
of the tests fail.  However, NunitConsole definitely is showing a fail
on this test.  I added some messages to the Assert()'s so that we could
better understand where it fails.

Can you take a look at this, or let us know if someone else should try?
I can't wait to find out what it is :).

The diff below shows the message strings I added.


Thanks,
Nick D.

Index: BitArrayTest.cs
===================================================================
RCS file:
/cvs/public/mcs/class/corlib/Test/System.Collections/BitArrayTest.cs,

retrieving revision 1.1
diff -u -r1.1 BitArrayTest.cs
--- BitArrayTest.cs     2001/10/17 17:36:03     1.1
+++ BitArrayTest.cs     2001/11/04 06:02:08
@@ -73,15 +73,15 @@
     byte [] byteArr = new byte[] { 0xaa, 0x55, 0xaa, 0x55, 0x80 };
     BitArray ba = new BitArray(byteArr);

-    AssertEquals(ba.Length, byteArr.Length * 8);
+    AssertEquals("Lengths not equal", ba.Length, byteArr.Length * 8);

     // spot check
-    Assert(ba[7]);
-    Assert(!ba[6]);
-    Assert(!ba[15]);
-    Assert(ba[14]);
-    Assert(ba[39]);
-    Assert(!ba[35]);
+    Assert("7 not true", ba[7]);
+    Assert("6 not false", !ba[6]);
+    Assert("15 not false", !ba[15]);
+    Assert("14 not true", ba[14]);
+    Assert("39 not true", ba[39]);
+    Assert("35 not false", !ba[35]);

   }