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

eclipse-aascw / aas-core-codegen / 36789061213

30 Sep 2026 11:03PM UTC coverage: 89.812% (+0.4%) from 89.397%
36789061213

push

github

web-flow
Transpile assert statements (#811)

We transpile ``assert`` statements in the verification functions and
the understood methods, *e.g.*:

    assert text is not None, "The caller must check the text"

C++ throws ``std::logic_error``, C# ``InvalidOperationException``,
Java ``IllegalStateException``, Go panics, TypeScript throws ``Error``,
and Python keeps the ``assert``. The message is optional and can be
a string literal or an f-string. Without it, the targets report
the condition as written in the meta-model.

As mypy, the type inference narrows by the condition after
the assertion, but not in the message, which runs only on failure.

The f-string messages uncovered three bugs in the transpiled f-strings.
Python and TypeScript crashed on a fragment ending in a space, Go
emitted a double comma in ``fmt.Sprintf``, and C++ stringified
a ``len(...)`` with the undeclared ``wstringification::to_wstring``.

The common meta-model ``assert_statements`` covers the feature.

220 of 251 new or added lines in 19 files covered. (87.65%)

45190 of 50316 relevant lines covered (89.81%)

2.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.4
/aas_core_codegen/cpp/optionaling.py


Source Not Available

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