text-builder 0.6.6 → 0.6.6.1
raw patch · 3 files changed
+3/−2 lines, 3 files
Files
- library/Text/Builder.hs +1/−1
- test/Main.hs +1/−0
- text-builder.cabal +1/−1
library/Text/Builder.hs view
@@ -292,7 +292,7 @@ byDivisor = div n divisor byExtraTen = div byDivisor 10 remainder = byDivisor - byExtraTen * 10- in if remainder == 0 || byExtraTen > 10+ in if remainder == 0 || byExtraTen >= 10 then thousandSeparatedDecimal separatorChar byExtraTen else thousandSeparatedDecimal separatorChar byExtraTen <> "." <> decimalDigit remainder
test/Main.hs view
@@ -91,5 +91,6 @@ assertEqual "" "1.1kB" (B.run (B.dataSizeInBytesInDecimal ',' 1100)) assertEqual "" "1.1MB" (B.run (B.dataSizeInBytesInDecimal ',' 1150000)) assertEqual "" "9.9MB" (B.run (B.dataSizeInBytesInDecimal ',' 9990000))+ assertEqual "" "10MB" (B.run (B.dataSizeInBytesInDecimal ',' 10100000)) assertEqual "" "1,000YB" (B.run (B.dataSizeInBytesInDecimal ',' 1000000000000000000000000000)) ]
text-builder.cabal view
@@ -1,5 +1,5 @@ name: text-builder-version: 0.6.6+version: 0.6.6.1 category: Text synopsis: An efficient strict text builder homepage: https://github.com/nikita-volkov/text-builder