Skip to content

Fix a test.#6923

Closed
bangerth wants to merge 1 commit intogeodynamics:mainfrom
bangerth:test
Closed

Fix a test.#6923
bangerth wants to merge 1 commit intogeodynamics:mainfrom
bangerth:test

Conversation

@bangerth
Copy link
Copy Markdown
Contributor

Found while getting #6870 to work: In one of the unit tests, we create a Particles::Property::Manager. Internally, this class assumes that it has been initialized, which specifically means that via its SimulatorAccess base class it can call get_simulator(). The manage object then uses the reference to the Simulator object to initialize the plugins it manages.

In this test (a unit test), we only create the Manager object, but never set up a Simulator object. That works in the current context because we don't actually ever do anything with a simulator. But it means that get_simulator() returns a null reference and we then hand that to the plugins. It's a miracle that nobody ever hit an assertion with this, but now I do in #6870, and so this needs to be fixed :-)

The approach is to create a dummy Simulator object and then initialize it with the minimal amount of fuss one can get away with.

@gassmoeller
Copy link
Copy Markdown
Member

As far as I understood this PR can now be closed?

@bangerth
Copy link
Copy Markdown
Contributor Author

bangerth commented Apr 2, 2026

Yes, thank you.

@bangerth bangerth closed this Apr 2, 2026
@bangerth bangerth deleted the test branch April 2, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants