#include "test_helpers.h"
#include "fmpz_mpoly_q.h"
TEST_FUNCTION_START(fmpz_mpoly_q_randtest, state)
{
slong iter;
for (iter = 0; iter < 1000 * 0.1 * flint_test_multiplier(); iter++)
{
fmpz_mpoly_ctx_t ctx;
fmpz_mpoly_q_t A;
fmpz_mpoly_ctx_init(ctx, 1 + n_randint(state, 4), ORD_LEX);
fmpz_mpoly_q_init(A, ctx);
fmpz_mpoly_q_randtest(A, state, 10, 10, 5, ctx);
if (!fmpz_mpoly_q_is_canonical(A, ctx))
{
flint_printf("FAIL: not canonical\n");
fmpz_mpoly_q_print_pretty(A, NULL, ctx);
flint_printf("\n");
flint_abort();
}
fmpz_mpoly_q_clear(A, ctx);
fmpz_mpoly_ctx_clear(ctx);
}
TEST_FUNCTION_END(state);
}