Changeset 37ed00 in git


Ignore:
Timestamp:
May 11, 2011, 4:02:15 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
45e35b62b6f04314377865c4eb8cad555c42f584
Parents:
568cf0845ad03f316fc5a94760ced50ad71135aa
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-05-11 16:02:15+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 12:36:03+01:00
Message:
ADD: test for a creation of a ring with specific ordering
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/tests/rings_test.h

    r568cf0 r37ed00  
    142142     rDelete(r);
    143143  }
    144    void test_QQ_x_y_z()
    145    {
     144
     145  void test_QQ_x_y_z()
     146  {
    146147     clog << "Creating  QQ[x, y, z, u]: " << endl;
    147148
     
    204205     rDelete(r); // kills 'cf' as well!
    205206   }
    206 
     207   
     208
     209
     210
     211
     212  void test_QQ_x_y_z_ord_2_lp()
     213  {
     214     clog << "Creating  QQ[x, y, z, u]: " << endl;
     215
     216     const int N = 4;
     217     char* n[N] = {"x", "y", "z", "u"};
     218
     219
     220     const int D = 2;
     221     /*order: lp,0*/
     222     int *order = (int *) omAlloc0(D* sizeof(int));
     223     int *block0 = (int *)omAlloc0(D * sizeof(int));
     224     int *block1 = (int *)omAlloc0(D * sizeof(int));
     225     /* ringorder dp for the first block: var 1..N */
     226     order[0]  = ringorder_dp;
     227     block0[0] = 1;
     228     block1[0] = N;
     229     /* the last block: everything is 0 */
     230//     order[1]  = 0;
     231
     232     ring r = rDefault(0, N, n, D, order, block0, block1);
     233     TS_ASSERT_DIFFERS( r, NULLp );
     234
     235     PrintRing(r);
     236
     237     TS_ASSERT( rField_is_Domain(r) );
     238     TS_ASSERT( rField_is_Q(r) );
     239
     240     TS_ASSERT( !rField_is_Zp(r) );
     241     TS_ASSERT( !rField_is_Zp(r, 11) );
     242
     243     TS_ASSERT_EQUALS( rVar(r), N);
     244
     245     Test(r);
     246     
     247     rDelete(r);
     248   }
    207249};
    208250
Note: See TracChangeset for help on using the changeset viewer.