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

moonbitlang / core / 6091
91%

Build:
DEFAULT BRANCH: main
Ran 15 Aug 2026 08:12AM UTC
Jobs 1
Files 437
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

15 Aug 2026 08:10AM UTC coverage: 90.72% (+0.006%) from 90.714%
6091

push

github

bobzhang
test(lazy_list): add extensional and intensional QuickCheck specs

A lazy list has two specifications that must hold at once, and a bug in
either is invisible to a test that only checks the other.

The extensional half — what elements come out — is settled by an Array
model: every combinator is mirrored by a three-line strict definition,
and the two must agree. The properties drive whole randomly generated
*pipelines* rather than single combinators, because the interesting
failures in a lazy structure live in the composition (flat_map feeding
take, concat feeding zip) and not in any one operation. Alongside that
sit the algebraic laws: functor identity and composition, flat_map's
singleton and annihilator cases, concat as a monoid, take/drop as a
partition, take_while/drop_while splitting at the same point, filter
idempotence and commutativity, and zip's two projections.

The intensional half — how much is forced, and when — is what makes
the structure worth having, and the doc comments state it precisely:
take forces "exactly the cells of the prefix -- no look-ahead", drop
forces "up to n cells", head "does not force the tail", tails memoize
so a thunk runs "at most once", and concat does not touch its
right-hand side until the left is exhausted. Those are pinned here as
*exact thunk counts* against an instrumented infinite source. An
implementation that quietly forced one cell too many would still pass
every extensional test, but would turn take on an infinite list from a
total function into a hang -- so the counts are asserted as equalities,
not bounds, and a final property re-runs every lazy combinator against
an infinite source to confirm it stays total.

All 20 tests pass on wasm, wasm-gc, js and native.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

16012 of 17650 relevant lines covered (90.72%)

157308.1 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6091.1 15 Aug 2026 08:12AM UTC 438
90.73
GitHub Action Run
Source Files on build 6091
  • Tree
  • List 437
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 25cbc5a3 on github
  • Prev Build on main (#6090)
  • Next Build on main (#6093)
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