Changeset 7af488e in git for libpolys/tests/coeffs_test.h


Ignore:
Timestamp:
May 27, 2011, 11:39:02 AM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38077648e7239f98078663eb941c3c979511150a')
Children:
9bb545791780a99344a26d6177decb3870f6da87
Parents:
6ccdd3ad26bd7de442ab57e7cc95352fcf0de398
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-05-27 11:39:02+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:39:06+01:00
Message:
nRegister not needed any more for standard coeffs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/tests/coeffs_test.h

    r6ccdd3a r7af488e  
    370370   {
    371371#ifdef HAVE_RINGS
    372      n_coeffType type = nRegister( n_Z2m, nr2mInitChar); TS_ASSERT( type == n_Z2m );
     372     n_coeffType type = n_Z2m;
    373373     TS_ASSERT( Test(type, (void*) 4) );
    374374#endif
     
    377377   void test_Zp101()
    378378   {
    379      n_coeffType type = nRegister( n_Zp, npInitChar); TS_ASSERT( type == n_Zp );
     379     n_coeffType type = n_Zp;
    380380     TS_ASSERT( Test(type, (void*) 101) );
    381381   }
     
    384384   {
    385385#ifdef HAVE_RINGS
    386      n_coeffType type = nRegister( n_Z2m, nr2mInitChar); TS_ASSERT( type == n_Z2m );
     386     n_coeffType type =  n_Z2m;
    387387     TS_ASSERT( Test(type, (void*) 8) );
    388388#endif
    389389   }
    390390   
    391    void simple(const n_coeffType _type, cfInitCharProc p)
    392    {
    393      n_coeffType type = nRegister( _type, p);
     391   void simple(const n_coeffType _type)
     392   {
     393     n_coeffType type = _type;
    394394     TS_ASSERT( type == _type ); // ?
    395395     TS_ASSERT( Test(type) );
     
    398398   void test_Q()
    399399   {
    400      simple(n_Q, nlInitChar);
     400     simple(n_Q);
    401401   }
    402402   
    403403   void test_R()
    404404   {
    405      simple(n_R, nrInitChar);
     405     simple(n_R);
    406406   }
    407407
     
    410410   {
    411411#ifdef HAVE_RINGS
    412      simple(n_Z, nrzInitChar);  // No need in GMP?
     412     simple(n_Z);  // No need in GMP?
    413413#endif
    414414   }
     
    417417   void test_GF_toobig()
    418418   {
    419      n_coeffType type = nRegister( n_GF, nfInitChar);
    420      TS_ASSERT( type == n_GF );
     419     n_coeffType type = n_GF;
    421420
    422421     GFInfo param;
     
    436435     // TODO: what if it was already registered?
    437436     // Q: no way to deRegister a type?
    438      n_coeffType type = nRegister( n_GF, nfInitChar);
    439      TS_ASSERT( type == n_GF );
     437     n_coeffType type = n_GF;
    440438
    441439     GFInfo param;
     
    456454#ifdef HAVE_RINGS
    457455     //  TODO(Somebody, This will result in memory corruption at Z_2^m later on (due to the succs. setGMPFloatDigits?)...!?); // ????
    458      n_coeffType type = nRegister( n_Zn, nrnInitChar); TS_ASSERT( type == n_Zn );
     456     n_coeffType type = n_Zn;
    459457
    460458     TS_ASSERT( Test(type, (void*) 3) );
     
    465463   {
    466464#ifdef HAVE_RINGS
    467      n_coeffType type = nRegister( n_Z2m, nr2mInitChar); TS_ASSERT( type == n_Z2m );
     465     n_coeffType type = n_Z2m;
    468466
    469467     TS_ASSERT( Test(type, (void*) 2) );
     
    476474   {
    477475     setGMPFloatDigits( 10, 5 ); // Init global variables in mpr_complex.cc for gmp_float's... // Note that this seems also to be required for Z_2^m (and Zn?)!????
    478      simple(n_long_R, ngfInitChar);
     476     simple(n_long_R);
    479477   }
    480478   
     
    482480   {
    483481     setGMPFloatDigits( 10, 5 ); // Init global variables in mpr_complex.cc for gmp_float's... // Note that this seems also to be required for Z_2^m (and Zn?)!????
    484      simple(n_long_C, ngcInitChar);
     482     simple(n_long_C);
    485483   } 
    486484
Note: See TracChangeset for help on using the changeset viewer.