1.1 --- a/test/maps_test.cc Thu Apr 03 13:00:18 2008 +0100
1.2 +++ b/test/maps_test.cc Tue Apr 08 22:51:26 2008 +0200
1.3 @@ -83,20 +83,27 @@
1.4 // ConstMap
1.5 {
1.6 checkConcept<ReadWriteMap<A,B>, ConstMap<A,B> >();
1.7 + checkConcept<ReadWriteMap<A,C>, ConstMap<A,C> >();
1.8 ConstMap<A,B> map1;
1.9 ConstMap<A,B> map2(B());
1.10 ConstMap<A,B> map3 = map1;
1.11 map1 = constMap<A>(B());
1.12 + map1 = constMap<A,B>();
1.13 map1.setAll(B());
1.14 + ConstMap<A,C> map4(C(1));
1.15 + ConstMap<A,C> map5 = map4;
1.16 + map4 = constMap<A>(C(2));
1.17 + map4.setAll(C(3));
1.18
1.19 checkConcept<ReadWriteMap<A,int>, ConstMap<A,int> >();
1.20 check(constMap<A>(10)[A()] == 10, "Something is wrong with ConstMap");
1.21
1.22 checkConcept<ReadWriteMap<A,int>, ConstMap<A,Const<int,10> > >();
1.23 - ConstMap<A,Const<int,10> > map4;
1.24 - ConstMap<A,Const<int,10> > map5 = map4;
1.25 - map4 = map5;
1.26 - check(map4[A()] == 10 && map5[A()] == 10, "Something is wrong with ConstMap");
1.27 + ConstMap<A,Const<int,10> > map6;
1.28 + ConstMap<A,Const<int,10> > map7 = map6;
1.29 + map6 = constMap<A,int,10>();
1.30 + map7 = constMap<A,Const<int,10> >();
1.31 + check(map6[A()] == 10 && map7[A()] == 10, "Something is wrong with ConstMap");
1.32 }
1.33
1.34 // IdentityMap