flint
flint copied to clipboard
Use `TEST_FUNCTION_FAIL` in tests
We should sort of standardize how tests fails, which I think is very suitable to do with a one call to flint_throw.
With #1646, a new error code is added for test fails, and it will also support printing FLINT types. Hence, I think that every test function should utilize flint_throw instead after this PR has been merged.
Just a thought: instead of
flint_throw(FLINT_ERROR, "msg");
flint_throw(FLINT_TEST_FAIL, "msg");
we could simply have
flint_error("msg");
flint_test_fail("msg");
Sounds reasonable.
Don't use this, but rather TEST_FUNCTION_FAIL, such as
TEST_FUNCTION_FAIL(
"Failed due to n < 10\n"
"Got n = %{fmpz}\n",
n);