Changeset e5422d in git for libpolys/tests/coeffs_test.h
 Timestamp:
 Apr 19, 2011, 6:16:27 PM (12 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
 Children:
 7f602bf34cba1848ae22dbe21a65ea4f2460604f
 Parents:
 8c99125adf3766ea3c93c4198e3f4aeed1b29b5f
 gitauthor:
 Oleksandr Motsak <motsak@mathematik.unikl.de>20110419 18:16:27+02:00
 gitcommitter:
 Mohamed Barakat <mohamed.barakat@rwthaachen.de>20111109 12:31:20+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

libpolys/tests/coeffs_test.h
r8c9912 re5422d 39 39 40 40 number sum1 = n_Init(ssss, r); 41 clog<< " sum1(int): "; PrintSized(sum1, r);41 clog<< "N*(N+1)/2 (int: " << ssss << "): "; PrintSized(sum1, r); 42 42 43 43 number s, ss, i, res; … … 48 48 n_Delete(&i, r); 49 49 50 clog<< "N*(N+1): ("<< N*(N+1) << ")"; PrintSized(s, r); 51 50 52 i = n_Init(2, r); 53 clog<< "2: "; PrintSized(i, r); 51 54 52 55 if( !n_IsZero( i, r) ) … … 55 58 res = n_Div(s, i, r); 56 59 57 clog<< "res: "; PrintSized(res, r); 58 59 TS_ASSERT( n_Equal(sum1, res, r) ); 60 TS_ASSERT( n_Equal(res, sum1, r) ); 60 clog<< "N*(N+1)/2: "; PrintSized(res, r); 61 number d = n_Sub(res, sum1, r); 62 63 TS_ASSERT( ndIsZeroDivisor(d, r) ); 64 65 if( n_GetChar(r) == 0 ) 66 { 67 TS_ASSERT( n_Equal(sum1, res, r) ); 68 TS_ASSERT( n_Equal(res, sum1, r) ); 69 } 61 70 } else 62 71 TS_ASSERT_EQUALS( n_GetChar(r), 2); … … 82 91 83 92 ss = n_Neg(ss, r); // ss = ss 84 85 93 94 clog<< "real sum : "; PrintSized(s, r); 95 clog<< "real sum(): "; PrintSized(ss, r); 96 86 97 TS_ASSERT( n_Equal(s, ss, r) ); 87 98 TS_ASSERT( n_Equal(ss, s, r) ); 88 99 89 clog<< "s: "; PrintSized(s, r);90 clog<< "ss: "; PrintSized(ss, r);91 92 100 n_Delete(&s, r); 93 101 n_Delete(&ss, r); 102 103 clog << ( " >>> TEST DONE!" ); 104 clog << endl; 105 94 106 } 95 107 … … 161 173 n_Delete(&aa1, r); 162 174 n_Delete(&aa2, r); 175 176 177 clog << ( " >>> TEST DONE!" ); 178 clog << endl; 179 163 180 } 164 181 … … 212 229 TS_ASSERT( nCoeff_is_Q( r )); 213 230 TS_ASSERT( nCoeff_is_Domain( r )); 214 TS_ASSERT( nCoeff_has_Units( r )); 215 TS_ASSERT( nCoeff_has_simple_inverse( r ));// ? 216 TS_ASSERT( nCoeff_has_simple_Alloc( r )); // ? 231 232 TS_ASSERT( !nCoeff_has_Units( r )); // ? 233 TS_ASSERT( !nCoeff_has_simple_inverse( r ));// ? 234 TS_ASSERT( !nCoeff_has_simple_Alloc( r )); // ? 217 235 218 236 TS_ASSERT( !nCoeff_is_Ring_2toM( r )); … … 291 309 292 310 TestArith( r ); 311 TestSum( r, 10 ); 293 312 TestSum( r, 100 ); 294 TestSum( r, 1000 ); 313 TestSum( r, 101 ); 314 TestSum( r, 1001 ); 315 TestSum( r, 9000 ); 295 316 296 317 nKillChar( r ); 297 298 clog << ( " >>> TEST DONE!" );299 clog << endl;300 318 301 319 return TRUE;
Note: See TracChangeset
for help on using the changeset viewer.