Changeset 1131


Ignore:
Timestamp:
Feb 23, 2008, 7:50:11 PM (13 years ago)
Author:
Peter
Message:

adding test for VectorConstView? independance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/view_test.cc

    r1121 r1131  
    6464  if ( !(b(0)==1 && b(1)==(1) && b(2)==1) )
    6565    ok = false;
     66
     67  // test that VectorConstView created from VectorView is independent
     68  // of VectorView
     69  {
     70    Vector vec(10,1.2);
     71    VectorView* vv = new VectorView(vec);
     72    VectorConstView vcv(*vv);
     73    delete vv;
     74    if (vcv.size()!=10)
     75      ok = false;
     76    if (vcv(0)!=1.2)
     77      ok = false;
     78  }
    6679 
    6780
Note: See TracChangeset for help on using the changeset viewer.