Skip to content

Conversation

@mabruzzo
Copy link
Collaborator

@mabruzzo mabruzzo commented Dec 17, 2025

To be reviewed after #469


This PR basically does 2 things:

  1. If factors out some logic from the test_ghost_zone.cpp tests and polishes it. This logic implements a fixture that:

    • initializes chemistry_data, chemistry_data_storage, and code_units using some "presets" before a test
    • obviously cleans up these particular allocations at the end of the test
    • the basic motivation is that there are a lot of really simple tests of Grackle's C API that we could write where we don't necessarily care about the specifics of exactly how Grackle is configured (as long as the configuration is semi-reasonable).
  2. Uses this machinery to help implement some basic tests for the ratequery API. (A bunch of these tests were informed by a PR that I'm working on in parallel)

Note

Aside: while the IteratorAdaptor machinery seems a little like its overkill, it comes in handy for iterating over the ratequery accessible rate names in this PR and subsequent PRs.
It also lets us implement iteration over dynamically-accessible chemistry parameters (e.g. see the tests introduced in #470)

@mabruzzo mabruzzo added the refactor internal reorganization or code simplification with no behavior changes label Dec 17, 2025
@mabruzzo mabruzzo force-pushed the ncc/adjust-api-tests branch from b21224f to 9b9620b Compare December 18, 2025 20:18
@mabruzzo mabruzzo force-pushed the ncc/adjust-api-tests branch from c24523d to 9764cf7 Compare December 19, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor internal reorganization or code simplification with no behavior changes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant