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

Portable savetxt and loadtxt #506

Closed
wants to merge 39 commits into from

Conversation

milancurcic
Copy link
Member

This PR implements specific formats to use in savetxt and loadtxt, and improves the tests to compare exact values and not just approximates.

It depends on tests in #494, so this should be rebased to master after #494 is merged. Or is there a better strategy for this, @awvwgk? The tests in awvwgk#87 need this fix to pass. Should this fix go there instead?

Fixes #505.

* Port test_open.f90 to test-drive
* Port test_parse_mode.f90 to test-drive
* Port test_savetxt.f90 to test-drive
* Port test_savetxt_qp.f90 to test-drive
* Port test_loadtxt.f90 to test-drive
* Add complex data test to test_loadtxt.f90
* Port test_loadtxt_qp.f90 to test-drive
* Clean all test artifacts in Makefile.manual
* Fix error handling in test_loadtxt
* Don't reuse output file names between tests
Copy link
Member

@awvwgk awvwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing. This looks like a good solution.

Note: Please do not merge this PR into stdlib master after review. This is part of #494 and will be included there.

@milancurcic
Copy link
Member Author

Sounds good. I'll close this PR and open against your branch in #494. The latest 2 commits expand the round-trip tests for tiny and huge numbers. These tests revealed a few more issues--one leading to a small fix in number_of_rows(), and another requiring broader width and exponent fields.

@milancurcic
Copy link
Member Author

Closing in favor of awvwgk#90.

@milancurcic milancurcic closed this Sep 4, 2021
@certik
Copy link
Member

certik commented Sep 5, 2021

I am struggling to review this, I see 51 changed files... That's too much.

Can we do one clean PR to port to a new test framework system (but do no other changes), and then send clean PRs with changes unrelated to the testsuite change?

@awvwgk
Copy link
Member

awvwgk commented Sep 5, 2021

@certik I added a comment for the recommended review process in #494 (comment).

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.

savetxt and loadtxt are not portable
4 participants