-
Notifications
You must be signed in to change notification settings - Fork 185
fypp for tests? #496
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
Comments
The reason are probably the build system limitations, the CMake tests are currently generated by an ugly macro and the manual Makefile tests by an include file template, both approaches lack the required flexibility to mix fypp preprocessed files and normal Fortran source code. It doesn't mean it is impossible, but the result is suboptimal at best. Rather than over-engineering our build systems further, I think the first step is adopting some testing framework and bundle together all tests in a consistent way, we acquired quite some different styles now in the testsuites. For this purpose we discussed using vegetables, fytest or test-drive in #162 and are now in the process of adopting test-drive in #494. Using fypp in the testsuite will be mainly useful for conditionally skipping tests in case the compiler does not support some of our requirements. |
I see, thanks for the detailed explanation. Great to hear that some plans for improvement are in motion though! I'm going to close the issue so as not to pollute the Issues. |
fypp is already used for the tests, e.g., see [`test_median.fypp`](
https://github.com/fortran-lang/stdlib/blob/47d0a00420e5257e7a95271fc04b7240f1ce4a89/src/tests/stats/test_median.fypp).
But indeed, its use should be extended to other tests. As Sebastian said,
it is currently being discussed/tested/implemented.
Le mar. 24 août 2021 à 23:54, Gabriel Brown ***@***.***> a
écrit :
… I considered bringing this up in the Discourse, but figured here was a
more relevant place.
*My question boils down to this*: is there a reason we are not taking
advantage of fypp for the stdlib tests (all of the test files I have seen
are .f90)? Especially for mathematical functions where one needs to test
reals, complex, and integers, a few lines of fypp could compress the
source code (pre-fypp) by more than 3 to 1 by looping over the kinds of
reals, complex, and integers.
I am sure there may be a good reason, but I have performed a quick search
in the Discourse and in other GitHub issues (turning up nothing) and tried
to reason about it (also turning up nothing).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#496>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD5RO7CEAP2V2KH6QXZZS2LT6QIJ7ANCNFSM5CXXHOIA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I missed that one, but good to hear it's possible. I'm going to keep my PR (in progress) for an addition to |
I considered bringing this up in the Discourse, but figured here was a more relevant place.
My question boils down to this: is there a reason we are not taking advantage of
fypp
for thestdlib
tests (all of the test files I have seen are.f90
)? Especially for mathematical functions where one needs to test reals, complex, and integers, a few lines offypp
could compress the source code (pre-fypp) by more than 3 to 1 by looping over the kinds of reals, complex, and integers.I am sure there may be a good reason, but I have performed a quick search in the Discourse and in other GitHub issues (turning up nothing) and tried to reason about it (also turning up nothing).
The text was updated successfully, but these errors were encountered: