mirror of
https://github.com/vale981/arb
synced 2025-03-06 01:41:39 -05:00
Merge pull request #104 from argriffing/bool-mat-complement-test-memleak
MAINT: fix mem leak in bool_mat complement involution test
This commit is contained in:
commit
298b670941
1 changed files with 12 additions and 6 deletions
|
@ -84,18 +84,17 @@ int main()
|
|||
for (iter = 0; iter < 10000; iter++)
|
||||
{
|
||||
slong m, n;
|
||||
bool_mat_t A, C, CC;
|
||||
bool_mat_t A, C;
|
||||
|
||||
m = n_randint(state, 10) + 1;
|
||||
n = n_randint(state, 10) + 1;
|
||||
|
||||
bool_mat_init(A, m, n);
|
||||
bool_mat_init(C, m, n);
|
||||
bool_mat_init(CC, m, n);
|
||||
|
||||
bool_mat_randtest(A, state);
|
||||
bool_mat_randtest(C, state);
|
||||
bool_mat_complement(C, A);
|
||||
bool_mat_complement(CC, C);
|
||||
|
||||
if ((bool_mat_all(A) && bool_mat_any(C)) ||
|
||||
(bool_mat_all(C) && bool_mat_any(A)))
|
||||
|
@ -105,10 +104,17 @@ int main()
|
|||
}
|
||||
|
||||
/* involution */
|
||||
if (!bool_mat_equal(A, CC))
|
||||
{
|
||||
flint_printf("FAIL (involution)\n");
|
||||
abort();
|
||||
bool_mat_t CC;
|
||||
bool_mat_init(CC, m, n);
|
||||
bool_mat_randtest(CC, state);
|
||||
bool_mat_complement(CC, C);
|
||||
if (!bool_mat_equal(A, CC))
|
||||
{
|
||||
flint_printf("FAIL (involution)\n");
|
||||
abort();
|
||||
}
|
||||
bool_mat_clear(CC);
|
||||
}
|
||||
|
||||
/* aliasing */
|
||||
|
|
Loading…
Add table
Reference in a new issue