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

stillwater-sc / universal / 25962306993
84%
master: 84%

Build:
Build:
LAST BUILD BRANCH: fix/issue-1002-ereal-highprec-constants
DEFAULT BRANCH: master
Ran 16 May 2026 01:14PM UTC
Jobs 1
Files 649
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

16 May 2026 12:47PM UTC coverage: 83.984% (+0.06%) from 83.929%
25962306993

push

github

web-flow
feat(integer, fixpnt): migrate/implement parse() onto string_parse (Phase B1 of #835) (#839)

* feat(integer, fixpnt): migrate/implement parse() onto string_parse (Phase B1 of #835)

Phase B1 of issue #835: bring `integer` and `fixpnt` onto the shared
constexpr string-parsing foundation that landed in Phase A (#838).

integer
-------
Replaces the std::regex + std::map + reverse-iteration parser body in
parse(const std::string&, integer&) with a clean MSB-first scan that
delegates prefix/sign detection and character classification to the
`sw::universal::string_parse` primitives.

Notable functional changes:
  - The previous octal branch was a `// TODO` that always returned false
    after detecting C-style leading-zero octal. Replaced with a real
    implementation gated on the explicit `0o` / `0O` prefix.
  - Binary (`0b` / `0B`) is newly supported.
  - Hex still accepts apostrophe as a digit separator (e.g. `0xDE'AD').
  - Decimal accepts a single optional leading `+` or `-`.
  - Drops the `<regex>` and `<map>` includes from integer_impl.hpp.

fixpnt
------
`fixpnt::parse()` was previously forward-declared (fixpnt_fwd.hpp:22) and
called by `operator>>` (fixpnt_impl.hpp:2073) but had no definition --
a latent link error that nobody had hit because no test exercises stream
input on fixpnt. This PR provides the definition.

Accepted syntax:
  [+-]? ( 0[bB][01]+ | 0[oO][0-7]+ | 0[xX][0-9A-F']+ | [0-9]+ )

Bit-pattern parsing (binary / octal / hex) fills the underlying storage
MSB-first via setbit(0) + left shift -- matches the convention of
setbits(). Decimal parsing is integer-only in this phase: the digit
string is accumulated as an integer K and stored as `K << rbits`, so
parse("5") on fixpnt<8,4> yields the value 5.0. Decimal-fraction
parsing ("3.14") is deferred to Phase B2 along with the analogous
float-from-string work for posit and cfloat.

Tests
-----
- static/integer/binary/api/string_parse.cpp -- 33 assertions covering
  decimal, binary, octal... (continued)

104 of 110 new or added lines in 2 files covered. (94.55%)

1 existing line in 1 file now uncovered.

46103 of 54895 relevant lines covered (83.98%)

6455983.32 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
89.63
1.28% include/sw/universal/number/integer/integer_impl.hpp
2
92.7
0.29% include/sw/universal/number/fixpnt/fixpnt_impl.hpp

Coverage Regressions

Lines Coverage ∆ File
1
31.07
-0.36% include/sw/universal/verification/test_suite_randoms.hpp
Jobs
ID Job ID Ran Files Coverage
1 25962306993.1 16 May 2026 01:14PM UTC 649
83.98
GitHub Action Run
Source Files on build 25962306993
  • Tree
  • List 649
  • Changed 5
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25962306993
  • 79a13120 on github
  • Prev Build on main (#25960118240)
  • Next Build on main (#25962944285)
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