Skip to content

Commit c3304a3

Browse files
committed
fix: tests
1 parent dc07cbe commit c3304a3

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

libpolys/coeffs/test.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,14 @@ int main( int, char *argv[] )
338338
#ifdef HAVE_RINGS
339339
type = n_Zn;
340340

341-
ZnmInfo * Znmparam= new ZnmInfo;
342-
Znmparam->base= (mpz_ptr) omAlloc (sizeof (mpz_t));
343-
mpz_init_set_ui (Znmparam->base, 3);
344-
Znmparam->exp= 1;
341+
ZnmInfo Znmparam;
342+
Znmparam.base= (mpz_ptr) omAlloc (sizeof (mpz_t));
343+
mpz_init_set_ui (Znmparam.base, 3);
344+
Znmparam.exp= 1;
345345

346-
if( Test(type, (void*) Znmparam) )
346+
if( Test(type, (void*) &Znmparam) )
347347
c ++;
348-
delete Znmparam;
348+
349349
#endif
350350

351351
type = n_long_C;

libpolys/tests/coeffs_test.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -447,13 +447,12 @@ class CoeffsTestSuite : public CxxTest::TestSuite
447447
#ifdef HAVE_RINGS
448448
n_coeffType type = n_Zn;
449449

450-
ZnmInfo * Znmparam= new ZnmInfo;
451-
Znmparam->base= (mpz_ptr) omAlloc (sizeof (mpz_t));
452-
mpz_init_set_ui (Znmparam->base, 3);
453-
Znmparam->exp= 1;
450+
ZnmInfo Znmparam;
451+
Znmparam.base= (mpz_ptr) omAlloc (sizeof (mpz_t));
452+
mpz_init_set_ui (Znmparam.base, 3);
453+
Znmparam.exp= 1;
454454

455-
TS_ASSERT( Test(type, (void*) Znmparam) );
456-
delete Znmparam;
455+
TS_ASSERT( Test(type, (void*) &Znmparam) );
457456
#endif
458457
}
459458

0 commit comments

Comments
 (0)