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

eclipse-aascw / aas-core-codegen / 35403500086
90%

Build:
DEFAULT BRANCH: main
Ran 18 Sep 2026 10:58PM UTC
Jobs 3
Files 264
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 Sep 2026 10:53PM UTC coverage: 86.001% (+0.08%) from 85.92%
35403500086

push

github

web-flow
Test optional in the common tuples meta-model (#733)

``Something`` of the ``tuples`` fixture carried three tuple properties,
every one of them required, so the combination of ``Optional`` and
``Tuple`` was never put in front of any generator. It gets one:

    #: Test an optional tuple, mixing a primitive with a polymorphic class
    optional_pair: Optional[Tuple[str, Abstract_item]]

The item types are picked so that the optional exercises both ends of
a tuple, a bare primitive and a model-typed class, which the XML side
writes in a ``<v1>`` and by dispatch on the element name respectively:

    "optionalPair": ["sixth", {"modelType": "AnotherItem", "serialNumber": 7}]

    <optionalPair><v1>sixth</v1><anotherItem>
      <serialNumber>7</serialNumber></anotherItem></optionalPair>

C++, Go, Java, Python, TypeScript, JSON Schema and XSD took the property
as it comes. C# did not, and failed to compile with nine errors:

    copying.cs(118,43): error CS1061: '(string, IAbstractItem)?' does not
    contain a definition for 'Item1'

A C# tuple is a ``System.ValueTuple`` and hence a value type, so an
optional of one is a ``System.Nullable`` and not the tuple itself: it is
probed with ``HasValue`` and unwrapped with ``Value`` before an item can
be reached. Every optional the generator had met so far -- a class,
a named union, a list -- is a reference type which is simply compared
against ``null``.

One bug is fixed along the way, in code which the optional tuple only
led us to read. The deep-equaliser of the generated ``TestCopying``
emitted a bare conditional for an optional property and joined the
properties with ``&&``, and the conditional operator binds weaker than
the conjunction, so everything in front of the first optional property
was swallowed into its condition:

    return (
        (that.EmbeddedDataSpecifications != null && ...)
            ? that.EmbeddedDataSpecifications.Count == ... && ...
            : that.EmbeddedDataSpecifications == nu... (continued)

50 of 50 new or added lines in 8 files covered. (100.0%)

35177 of 40903 relevant lines covered (86.0%)

2.58 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3.10 - 35403500086.1 18 Sep 2026 11:01PM UTC 264
86.0
GitHub Action Run
2 3.11 - 35403500086.2 18 Sep 2026 11:01PM UTC 264
86.0
GitHub Action Run
3 3.12 - 35403500086.3 18 Sep 2026 11:01PM UTC 264
86.0
GitHub Action Run
Source Files on build 35403500086
  • Tree
  • List 264
  • Changed 16
  • Source Changed 0
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 532b429e on github
  • Prev Build on main (#35396929406)
  • Next Build on main (#35404588988)
  • 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