Skip to content

Convert double to words model tests to GTest - #111

Open
ninotarantino wants to merge 7 commits into
mainfrom
convert-double-to-words-tests-to-gtest
Open

ninotarantino wants to merge 7 commits into
mainfrom
convert-double-to-words-tests-to-gtest

Conversation

@ninotarantino

Copy link
Copy Markdown
Contributor

Modernize the double to words model tests and convert its documentation to our new Doxygen/Sphinx format.

@ninotarantino
ninotarantino marked this pull request as ready for review September 18, 2026 13:11
@ninotarantino
ninotarantino requested a review from a team September 18, 2026 13:11
a resolution of 0.1. This is a common case for flight software telemetry, which tends to pack floating point numbers into
smaller buffers of known resolution per bit due to limited bandwidth.

.. graphviz::

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this content be rendering into a table?

If I try to view file, I get:

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can download the built documentation from the Upload pages preview stage of the Docs / build job below. Sphinx extensions like graphviz aren't going to render in the PR preview.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

Comment thread utility/doc_template/VV_template.odp Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a presentation template ready to replace this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this document is something Ramtares needs to own since it's an Antares-specific document. When CML establishes an internal V&V process, if it continues using PowerPoint presentations, a new one will be uploaded.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the strategy for testing build compatibility with Trick?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment it's the Trickification process but agreed, that won't catch if the library dependency somehow breaks. I'll restore one sim with a notional run.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirming -- Trickification is part of the CI testing?

Can Trickification complete if the library dependency breaks?

@ninotarantino ninotarantino Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, we build and Trickify CML, then build and run all unit sims. Trickification would still complete even with bad library dependencies since Trick isn't building any of the actual model code. It would choke on SWIG issues. And the libcml build would also complete since that only depends on cmake.

So yeah, I'll need to put one of those unit sims back to test that the library dependencies are valid.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to have a single "master" sim to build all models to test for Trick compatibility, or keep a small sim in each model?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I like that idea! We already need to define an S_source.hh which includes every CML header for Trickification. We could just have a SIM_test_trick_compatibility in utilities which includes that file. Then if it builds, we know the library dependencies in CML are all valid. I'll push something like that next week.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created follow-up issue: #115

Comment thread models/utilities/double_to_words/test/convert_double_to_words_test.cc Outdated
@coveralls

coveralls commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 89.461% (+0.005%) from 89.456% — convert-double-to-words-tests-to-gtest into main

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes the public virtual destructor from ConvertDoubleToUintWords even though the PR is framed as test/docs modernization. That changes the C++ ABI and makes deletion through a base pointer unsafe for downstream subclasses. Unless that API break is intentional, I think the virtual destructor should stay.

@ninotarantino

Copy link
Copy Markdown
Contributor Author

This removes the public virtual destructor from ConvertDoubleToUintWords even though the PR is framed as test/docs modernization. That changes the C++ ABI and makes deletion through a base pointer unsafe for downstream subclasses. Unless that API break is intentional, I think the virtual destructor should stay.

Good catch, that's unintentional. Will fix on Monday.

@garyt2

garyt2 commented Sep 21, 2026

Copy link
Copy Markdown

More thoughts on the documentation -- I think the choice to describe the tests in the test-code comments and reference those from the documentation is the wrong way around. These should be comprehensively documented in the model documentation and referenced from the test-code.

@ninotarantino

Copy link
Copy Markdown
Contributor Author

More thoughts on the documentation -- I think the choice to describe the tests in the test-code comments and reference those from the documentation is the wrong way around. These should be comprehensively documented in the model documentation and referenced from the test-code.

Sure, I can move that over into the docs.

Added detailed descriptions to each test case in the documentation
and fixed the accidental removal of the virtual destructor.

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rechecked current 7ef567f. The public virtual destructor is restored as virtual ~ConvertDoubleToUintWords() = default;, so the unintended ABI / polymorphic-deletion break I raised is resolved. The current build, static-analysis and test checks are green. No remaining blocker from my review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants