Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

axis_utils unit tests #1

Open
wants to merge 32 commits into
base: axis_utils2
Choose a base branch
from
Open

Conversation

J-Lentz
Copy link

@J-Lentz J-Lentz commented Feb 16, 2023

Initial implementation of axis_utils unit tests.

Jesse Lentz and others added 30 commits February 16, 2023 11:14
Initial implementations of unit tests for most of the public procedures in the
axis_utils module. Currently, two tests fail:
* frac_index (fails with r4_kind)
* tranlon (fails with r8_kind)
Print more descriptive messages while running the axis utils unit tests.
Various improvements have been made to the axis_utils unit tests:
* Replace real(const, KIND) with const_KIND
* Fix the frac_index test
* Replace include file with Automake macro definitions
* Print more informative error messages
A unit test for `get_axis_cart` from `axis_utils2` has been implemented. The
test fails; it must be determined whether this should be considered a flaw in
`get_axis_cart`, or a flaw in the test.
Use an explicit kind for all real constants in `test_axis_utils.F90`.
Merge the `string` branch, which contains the extended version of `string` and
the new `stringify` functions from `fms_string_utils_mod`.
`string()` has been modified to strip leading and trailing whitespace, making
the `PRETTY()` macro redundant. The array stringification functions have also
been removed, since they've been added to `fms_string_utils_mod` under the
`stringify` interface.
Define the `C(x)` macro in a way that works on all compilers.
Revise the comments in `test_axis_utils.F90`
There's no obvious way to make the `C(x)` macro work with the Cray compiler,
so it's been replaced with the global parameter `k`. To free up the `k`
symbol, the array comparison subroutines have been refactored with new
variable names.
For the sake of brevity, replace several instances of `FMS_TEST_KIND_` with
the `k` parameter. The macro-based definition of `kind_str` has been replaced
by an 'if/else' statement which sets `kind_str` at runtime.
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