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

moonbitlang / core / 6975
89%

Build:
DEFAULT BRANCH: main
Ran 12 Oct 2026 12:06AM UTC
Jobs 1
Files 440
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

12 Oct 2026 12:02AM UTC coverage: 89.519%. Remained the same
6975

push

github

web-flow
refactor(string): remove unused UInt16 surrogate-pair helper (#4344)

`string/utils.mbt` carried a private copy of the surrogate-pair composition
that takes `UInt16` parameters. Nothing calls it: every real call site of
`code_point_of_surrogate_pair` lives in `builtin` (stringview, string_methods,
string, deprecated) and uses the `Int` version in `builtin/string.mbt`. The
only reference to this copy was its own test.

Besides being dead, the `UInt16` signature hides a difference. Its
`leading - 0xD800` is computed in `UInt16`, so it wraps modulo 0x10000 for
any `leading < 0xD800` instead of going negative the way the `Int` version
does. The two copies are bit-identical whenever `leading >= 0xD800`, which
is every input a guarded call site passes, so the divergence is invisible
today -- but it would change behaviour the moment the copies were unified,
or the `UInt16` one were reused by a caller holding raw code units (the
json lexer does exactly that).

Remove the function and its test. The remaining tests in the file cover the
`UInt16`/`Int` surrogate predicates and are unaffected.

Co-authored-by: SeekMoon <seekmoon@moonbitlang.com>

16740 of 18700 relevant lines covered (89.52%)

377688.57 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6975.1 12 Oct 2026 12:07AM UTC 440
89.52
GitHub Action Run
Source Files on build 6975
  • Tree
  • List 440
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ae9f5f37 on github
  • Prev Build on main (#6972)
  • Next Build on main (#6981)
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