Changeset 159:c7d30f7810e5 in lemon-1.2 for test
- Timestamp:
- 05/26/08 01:35:59 (17 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/maps_test.cc
r136 r159 305 305 "Something is wrong with EqualMap"); 306 306 } 307 308 // StoreBoolMap 309 { 310 typedef std::vector<int> vec; 311 vec v1; 312 vec v2(10); 313 StoreBoolMap<std::back_insert_iterator<vec> > map1(std::back_inserter(v1)); 314 StoreBoolMap<vec::iterator> map2(v2.begin()); 315 map1.set(10, false); 316 map1.set(20, true); map2.set(20, true); 317 map1.set(30, false); map2.set(40, false); 318 map1.set(50, true); map2.set(50, true); 319 map1.set(60, true); map2.set(60, true); 320 check(v1.size() == 3 && v2.size() == 10 && 321 v1[0]==20 && v1[1]==50 && v1[2]==60 && v2[0]==20 && v2[1]==50 && v2[2]==60, 322 "Something is wrong with StoreBoolMap"); 323 324 int i = 0; 325 for ( StoreBoolMap<vec::iterator>::Iterator it = map2.begin(); 326 it != map2.end(); ++it ) 327 check(v1[i++] == *it, "Something is wrong with StoreBoolMap"); 328 } 307 329 308 330 return 0;
Note: See TracChangeset
for help on using the changeset viewer.