stdlib: Dictionary, Set: stop overallocating the bitmap

The 'sizeInWords(forSizeInBits:)' function was supposed to return the
size in words, but returned the size in bits, overallocating the bitmap
by a factor of 32 or 64, depending on the platform.
This commit is contained in:
Dmitri Gribenko
2016-05-23 17:03:09 -07:00
parent cb5a225d7a
commit d74b1834f8
2 changed files with 2 additions and 3 deletions

View File

@@ -41,8 +41,7 @@ UnsafeBitMapTests.test("wordIndex(_:), bitIndex(_:)") {
#endif
}
UnsafeBitMapTests.test("sizeInWords(forSizeInBits:)")
.xfail(.always("the API is buggy")).code {
UnsafeBitMapTests.test("sizeInWords(forSizeInBits:)") {
expectEqual(0, _UnsafeBitMap.sizeInWords(forSizeInBits: 0))
#if arch(i386) || arch(arm)
for i in 1...32 {