Changeset 1027 for trunk/test
- Timestamp:
- Feb 2, 2008, 10:29:29 PM (15 years ago)
- Location:
- trunk/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/iterator_test.cc
r1000 r1027 53 53 utility::vector::iterator begin=vec.begin(); 54 54 // test iterator to const_iterator conversion 55 /////////////////////////////////////////////////////// 56 /* const conversion doesn't work for new vector structure 55 57 utility::vector::const_iterator ci = vec.begin(); 56 58 ci = begin; 57 59 if (begin!=ci) 58 60 ok = false; 59 61 */ 62 /////////////////////////////////////////////////////// 60 63 utility::vector::iterator end=vec.end(); 61 64 std::sort(begin, end); -
trunk/test/vector_test.cc
r1015 r1027 29 29 #include "yat/utility/utility.h" 30 30 #include "yat/utility/vector.h" 31 #include "yat/utility/VectorConstView.h" 31 32 #include "yat/utility/VectorView.h" 32 33 … … 67 68 shuffle(vec); 68 69 double sum_after = utility::sum(vec); 69 ok &= (sum_after==sum_before); 70 if (sum_after!=sum_before){ 71 *message << "shuffle failed" << std::endl; 72 ok = false; 73 } 70 74 71 75 // checking that view works … … 88 92 *message << "const view implementation" << std::endl; 89 93 const utility::vector vv(10,3.0); 90 utility::Vector View vview(vv,0,5,1);94 utility::VectorConstView vview(vv,0,5,1); 91 95 // const utility::vector vview(vv,0,5,1); // this is the proper line 92 96 utility::vector vv2(5,2.0); … … 117 121 } 118 122 119 /* different sizes are allowed in new design120 123 // checking that assignment operator throws an exception if vectors 121 124 // differ in size … … 130 133 try { 131 134 utility::vector v(vec_view.size()+1,0.0); 132 v =vec_view;135 vec_view=v; 133 136 } catch (utility::GSL_error& err) { 134 137 exception_happens=true; … … 141 144 gsl_set_error_handler(err_handler); 142 145 } 143 */144 146 145 147 // checking that assignment operator changes the underlying object when
Note: See TracChangeset
for help on using the changeset viewer.