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

Create template for tests #1533

Closed
albinahlback opened this issue Oct 15, 2023 · 1 comment
Closed

Create template for tests #1533

albinahlback opened this issue Oct 15, 2023 · 1 comment

Comments

@albinahlback
Copy link
Collaborator

Tests looks very similar, like

#include "fmpz.h"

int main(void)
{
    /* Declarations */

    FLINT_TEST_INIT(state);
    flint_printf("add....");
    fflush(stdout);

    /* Performing tests */

    FLINT_TEST_CLEANUP(state);
    flint_printf("PASS\n");
    return 0;
}

We can reduce this, just like what is currently proposed in #1341, to something like

#include "test_helpers.h"
#include "fmpz.h"

TEST_FUNCTION_START(fmpz_add)
{
    /* Declarations */

    /* Performing tests */

    TEST_FUNCTION_END;
}

Note: I want to add that I think it is a good idea to print fmpz_add... instead of add... since it clearly specifies what function is being tested.

@albinahlback albinahlback pinned this issue Oct 27, 2023
@albinahlback
Copy link
Collaborator Author

Completed as of #1341.

@albinahlback albinahlback unpinned this issue Nov 2, 2023
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

No branches or pull requests

1 participant