Changeset 1720


Ignore:
Timestamp:
Jan 15, 2009, 6:51:07 AM (12 years ago)
Author:
Peter
Message:

adding some tests that refs #474. The commented code should compile before closing this ticket

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/view_test.cc

    r1487 r1720  
    3131#include <iostream>
    3232#include <string>
     33
     34using namespace theplu::yat;
     35void test_rvalue(test::Suite&);
     36void test_rvalue_func(test::Suite& suite, const utility::VectorBase& vec);
    3337
    3438int main(int argc, char* argv[])
     
    126130  }
    127131 
     132  test_rvalue(suite);
    128133
    129134  return suite.return_value();
    130135}
    131136
     137void test_rvalue(test::Suite& suite)
     138{
     139  using namespace utility;
     140  suite.err() << "test rvalue" << std::endl;
     141  Matrix m(10,10);
     142  VectorView vv(m.row_view(0));
     143  // this block doesn't compile, se ticket:474
     144  // vv = m.row_view(1);
    132145
     146  //Vector vec(m.row_view(0));
     147  //vec = m.row_view(1);
     148
     149  //VectorConstView vcv(m.row_view(0));
     150  //test_rvalue_func(suite, m.row_view(0));
     151
     152  test_rvalue_func(suite, m.row_const_view(0));
     153
     154}
     155
     156void test_rvalue_func(test::Suite& suite, const utility::VectorBase& vec)
     157{
     158  suite.err() << "test_rvalue_func: size: " << vec.size() << std::endl;
     159}
Note: See TracChangeset for help on using the changeset viewer.