• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moonbitlang / core / 8298
87%

Build:
DEFAULT BRANCH: main
Ran 14 Nov 2026 06:04AM UTC
Jobs 1
Files 695
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Nov 2026 06:01AM UTC coverage: 88.266% (+0.004%) from 88.262%
8298

push

github

bobzhang
fix: abort on negative capacity in every collection constructor

The `capacity` label now names the initial allocation on Array, Map, Set,
HashMap, HashSet, Deque, Queue, StringBuilder and Buffer, but a negative
value meant three different things: StringBuilder aborted, Buffer and the
from-array collection constructors silently clamped it away, and Array
reached the backend allocator with it. All of them now abort with
"capacity must be non-negative", matching StringBuilder.

Buffer also stops raising capacities below 1 to 1. The growth path already
starts from 1 when the buffer is empty, so `Buffer(capacity=0)` grows the
same way and the documented default of 0 is now accurate.

Also renames the leftover `size_hint` names that are exact allocations
(StringBuilder benches, base64 encoder, archive/zip's private
Output::writing) to `capacity`.

22 of 22 new or added lines in 9 files covered. (100.0%)

25719 of 29138 relevant lines covered (88.27%)

763017.62 hits per line

Jobs
ID Job ID Ran Files Coverage
1 8298.1 14 Nov 2026 06:04AM UTC 695
88.27
GitHub Action Run
Source Files on build 8298
  • Tree
  • List 695
  • Changed 10
  • Source Changed 10
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • e6871525 on github
  • Prev Build on main (#8296)
  • Next Build on main (#8304)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc