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

bemanproject / expected / 39364816433
98%

Build:
DEFAULT BRANCH: main
Ran 20 Oct 2026 03:42AM 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

20 Oct 2026 03:32AM UTC coverage: 97.529%. Remained the same
39364816433

push

github

web-flow
Extract the negative compile test macro into a reusable beman_add_xfail_compile_test module (#108)

## Summary

The 59 negative compile tests were registered through a three-argument
`add_fail_test` macro local to `tests/beman/expected/CMakeLists.txt`.
This PR turns it into a reusable CMake module,
`cmake/beman-xfail-compile.cmake`, written in the shape of
`beman-install-library.cmake` so it can move to `bemanproject/infra`
unchanged. Which tests exist and what each one expects does not change:
every regex ctest receives was checked byte-identical to the one the
macro passed.

Three commits do the work, each with its own verification; the plan and
its decision log are in `docs/plan/extract-xfail-compile.md`.

1. **`beman_add_xfail_compile_test`** replaces the macro. Keyword
interface (`SOURCE`, `LINK_LIBRARIES`, `COMPILE_DEFINITIONS`,
`TARGET_PREFIX`, `LABELS`, `EXPECT`), same per-test target names, same
ctest names.
2. **A driver script** runs the nested build instead of relying on
`PASS_REGULAR_EXPRESSION`. It tells apart "the source compiled" from "it
failed, but not with the expected diagnostic", neither of which the bare
regex could report. Tests get the label `xfail-compile` and a
`RESOURCE_LOCK`, so `ctest -j` is safe and `ctest -L xfail-compile` runs
just this suite. `$<CONFIGURATION>` becomes `$<CONFIG>`.
3. **The regex lives in the test source.** Each `_fail.test.cpp` carries
`// EXPECT: "<regex>"` next to the ill-formed line; the module reads it
at configure time, and a source without one fails configure naming the
file. 35 files already matched, 15 carried an older subset, 9 had none;
all 59 now carry the regex that was proven on gcc, clang, and MSVC. Long
alternations are split across several `EXPECT` lines (joined with `|`)
because clang-format reflows comments past column 119.

## Demonstration

A real test under `ctest -V` now says which diagnostic it matched:

```
5: -- beman-xfail-compile-driver: beman.expected.tests.unexpected_array... (continued)

829 of 850 relevant lines covered (97.53%)

22.91 hits per line

Jobs
ID Job ID Ran Files Coverage
1 39364816433.1 20 Oct 2026 03:42AM UTC 3
97.53
GitHub Action Run
Source Files on build 39364816433
  • Tree
  • List 3
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #39364816433
  • a174df2c on github
  • Prev Build on main (#39300948700)
  • Next Build on main (#40745202438)
  • 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