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

Testing more borts. #379

Merged
merged 14 commits into from
Mar 14, 2023
Merged

Testing more borts. #379

merged 14 commits into from
Mar 14, 2023

Conversation

edwardhartnett
Copy link
Contributor

@edwardhartnett edwardhartnett commented Mar 13, 2023

Part of #381.

In this PR I add testing for borts of more functions.

@jbathegit jbathegit mentioned this pull request Mar 14, 2023
@edwardhartnett edwardhartnett changed the title Ejh error 2 Testing more borts. Mar 14, 2023
@edwardhartnett edwardhartnett marked this pull request as ready for review March 14, 2023 13:35
@edwardhartnett
Copy link
Contributor Author

More bort() testing will come, but let's get these working tests into the repo.

The test_bort.F90 program can be used to test any bort situation, but so far I have been adding tests for the low-hainging fruit, borts that can be easily achieved by passing bad input to a subroutine, without any setup required.

In other cases, setup may be required to test a bort.

In some cases, like a bort in closbf() for example, it may be practically impossible to test without causing a memory leak. If our test program opens a file, and then causes a bort on the close call, the file never gets closed and the resources never released, leading to a memory leak, which will cause the test to fail. ;-)

Anyway, I will harvest the low-hanging fruit and we'll see where we are. It may not be possible to test all borts.

@jbathegit jbathegit merged commit f299f02 into develop Mar 14, 2023
@edwardhartnett edwardhartnett deleted the ejh_error_2 branch March 15, 2023 12:27
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