Skip to content

De-hardcode calling other ERFA functions in tests - #317

Merged
avalentino merged 1 commit into
liberfa:mainfrom
eerovaher:func-calls-in-tests
Aug 14, 2026
Merged

De-hardcode calling other ERFA functions in tests#317
avalentino merged 1 commit into
liberfa:mainfrom
eerovaher:func-calls-in-tests

Conversation

@eerovaher

Copy link
Copy Markdown
Collaborator

Among other things erfa_generator translates an ERFA C test file to Python. Some of the test functions call other ERFA functions, not just the function being tested. On current main the additional information for translating those function calls is mostly hard-coded in erfa_generator, but in this PR TestFunction has an attribute that contains all other ERFA functions the test function calls, so the required information can be looked up from the corresponding Function instances. The called functions could be identified by inspecting the C source code, but the test function doc comments list the called functions, so it is simpler to extract the names from there.

There are no changes to any of the files erfa_generator creates.

Among other things `erfa_generator` translates an ERFA C test file to
Python. Some of the test functions call other ERFA functions, not just
the function being tested. So far the additional information for
translating those function calls has been hard-coded in `erfa_generator`
to a very large extent, but now `TestFunction` has an attribute that
contains all other ERFA functions the test function calls, so the
required information can be looked up from the corresponding `Function`
instances. The called functions could be identified by inspecting the C
source code, but the test function doc comments list the called
functions, so it was simpler to extract the names from there.
@avalentino
avalentino merged commit f86515d into liberfa:main Aug 14, 2026
27 checks passed
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.

2 participants