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

moonbitlang / core / 1455 / 1
97%
main: 97%

Build:
DEFAULT BRANCH: main
Ran 05 Oct 2025 05:05AM UTC
Files 256
Run time 6s
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

05 Oct 2025 05:04AM UTC coverage: 89.215% (-0.004%) from 89.219%
1455.1

push

github

bobzhang
refactor(immut/sorted_set): Change Compare implementation to compare by size first

BREAKING CHANGE: The Compare trait implementation for SortedSet now compares
sets by size first before comparing elements lexicographically. This is a
semantic change from the previous behavior.

Previous behavior:
- Compared sets element-by-element lexicographically
- {1,2} > {3} because 3 > 2 (compared until one iterator exhausted)

New behavior:
- Compares by size first, then by elements if sizes are equal
- {1,2} > {3} because size(2) > size(1)
- Only compares elements lexicographically when sizes are equal

Rationale:
- More intuitive: larger sets are "greater than" smaller sets
- Performance: Size comparison is O(1), avoids unnecessary element iteration
- Consistency: Matches common set comparison semantics in other languages

Changes:
- Refactored iterator-based Eq and Compare implementations to generic.mbt
- Extracted InorderIterator to external_iterator.mbt
- Added comprehensive tests for both same-size and different-size comparisons
- Both implementations now use the external iterator for element traversal

Request for review:
This is a breaking change that affects anyone using Compare/ordering operations
on SortedSet. Please review whether this new semantic is acceptable.

9298 of 10422 relevant lines covered (89.22%)

193160.34 hits per line

Source Files on job 1455.1
  • Tree
  • List 256
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1455
  • c8eae561 on github
  • Prev Job for on main (#1453.1)
  • Next Job for on main (#1457.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc