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

bemanproject / expected / 39147716213
98%

Build:
DEFAULT BRANCH: main
Ran 18 Oct 2026 05:05PM UTC
Jobs 1
Files 3
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

18 Oct 2026 05:02PM UTC coverage: 97.532% (+2.0%) from 95.522%
39147716213

push

github

web-flow
test: cover the remaining unexercised members and copy-assignment branches (#101)

Supersedes #80 and #82, rebuilt on current `main`. Both had fallen
behind the switch from `static_assert` to runtime `CHECK`s and the
conversion tests added since.

### What's here

- **Remaining unexercised members** (from #80). Tests for the
out-of-line definitions no test reached. Most are `const&` overloads
shadowed by their `&&` twins: `const unexpected<G>&` construction and
assignment, converting move constructors, `error_or() &&`, the `const&`
monadic overloads of `expected<void, E>` and `expected<T&, E>`, the
ref-qualified `error()` overloads of `expected<T&, E>`, its `unexpect_t`
+ `initializer_list` constructor, and
`bad_expected_access<void>::what()`. Also excludes
`BEMAN_EXPECTED_TRAP()` lines from the gcovr report: reaching one kills
the process before libgcov flushes, so they can't be covered by
construction.
- **Reference specializations in the hardened build** (from #82).
`expected_hardened.test.cpp` never instantiated `expected<T&, E>` or any
reference `E`, so 6 of the 21 trap sites were never compiled. It now
covers all four reference shapes.
- **`expected<void, E&>` conversion tests that didn't convert.** Two
tests named for the `expected<void, G&>` converting constructors used
the same type on both sides, so they ran the copy and move constructors
instead. Their destinations now bind `const int&`.
- **Copy assignment with a non-trivial `E`.** The existing
copy-assignment tests for `expected<void, E>` and `expected<T&, E>` all
use `int`, which takes the trivial path, so the non-trivial operator's
mixed-state branches never ran. These tests use `std::string`.

Where the PRs had `static_assert`s on types or traits, they're now
`CHECK`s, matching the rest of the suite. The one exception asserts the
`initializer_list` constructor under constant evaluation, which is the
thing being tested.

### Results

- gcc-16: 1248/1248 tests pass (1178 on `main`).
- Ev... (continued)

830 of 851 relevant lines covered (97.53%)

23.08 hits per line

Coverage Regressions

Lines Coverage ∆ File
21
97.4
1.87% include/beman/expected/expected.hpp
Jobs
ID Job ID Ran Files Coverage
1 39147716213.1 18 Oct 2026 05:05PM UTC 3
97.53
GitHub Action Run
Source Files on build 39147716213
  • Tree
  • List 3
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39147716213
  • bac8cd43 on github
  • Prev Build on main (#39086008363)
  • Next Build on main (#39159879246)
  • Delete
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