Changeset ae6d28 in git for libpolys/tests


Ignore:
Timestamp:
May 19, 2011, 5:51:16 AM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
75ddacf89c11403a22f95c5c832d61d939a24b33
Parents:
c8204aefe85bd27523a76a77f4ae555c156bdc21
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-05-19 05:51:16+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:36:09+01:00
Message:
ADD: 0-pointer guards to avoid seg.faults
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/tests/polys_test.h

    rc8204a rae6d28  
    192192void Test(const ring r)
    193193{
    194   TestSum( r, 10 );
    195   TestSum( r, 100 );
    196   TestSum( r, 101 );
    197   TestSum( r, 1001 );
    198   TestSum( r, 9000 );
     194  if( r == NULL )
     195      TS_FAIL("Could not get needed ring");
     196  else
     197  {
     198    TestSum( r, 10 );
     199    TestSum( r, 100 );
     200    TestSum( r, 101 );
     201    TestSum( r, 1001 );
     202    TestSum( r, 9000 );
     203  }
    199204}
    200205
     
    316321     const coeffs cf = nInitChar( n_GF, &param );
    317322
     323     if( cf == NULL )
     324       TS_FAIL("Could not get needed coeff. domain");
     325
    318326     TS_ASSERT_DIFFERS( cf, NULLp );
    319327
     
    375383
    376384    const coeffs cf = nInitChar(type, &extParam);   // Q[a]/<a2+1>
     385   
     386    if( cf == NULL )
     387      TS_FAIL("Could not get needed coeff. domain");
    377388
    378389    TS_ASSERT_DIFFERS( cf->cfCoeffWrite, NULLp );
     390   
     391   
    379392 
    380393    if( cf->cfCoeffWrite != NULL )
Note: See TracChangeset for help on using the changeset viewer.