http://d.puremagic.com/issues/show_bug.cgi?id=10948

           Summary: BitArray.opEquals is invalid
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from nbelov <[email protected]> 2013-09-01 21:33:36 PDT 
---
Created an attachment (id=1245)
diff with git master

Invalid calculation n value:
-        auto n = this.length / bitsPerSizeT;
+        auto n = (this.length + (bitsPerSizeT - 1)) / bitsPerSizeT;


Test:
//                  0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5
6 7
static bool[] bf =
[1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
static bool[] bg =
[1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1];

BitArray f; f.init(bf);
BitArray g; g.init(bg);
assert(f != g);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to