Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50741 - in sandbox/itl: boost/itl boost/itl/type_traits libs/itl/test libs/itl/test/test_interval_map_mixed libs/itl/test/test_interval_set libs/itl/test/test_separate_interval_set libs/itl/test/test_split_interval_set
From: afojgo_at_[hidden]
Date: 2009-01-23 05:20:02


Author: jofaber
Date: 2009-01-23 05:20:01 EST (Fri, 23 Jan 2009)
New Revision: 50741
URL: http://svn.boost.org/trac/boost/changeset/50741

Log:
Added tests: Added overloading tests for infix .&. testing is_inter_combinable<T>. Added is_cross_combinable<T>
Stable {msvc-9.0, partly congcc-4.3-a7}

Text files modified:
   sandbox/itl/boost/itl/interval_maps.hpp | 137 --------------------
   sandbox/itl/boost/itl/interval_sets.hpp | 261 +--------------------------------------
   sandbox/itl/boost/itl/type_traits/is_combinable.hpp | 19 ++
   sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp | 15 ++
   sandbox/itl/libs/itl/test/test_interval_set/test_interval_set_shared.cpp | 4
   sandbox/itl/libs/itl/test/test_interval_set_shared.hpp | 21 +++
   sandbox/itl/libs/itl/test/test_separate_interval_set/test_separate_interval_set_shared.cpp | 5
   sandbox/itl/libs/itl/test/test_split_interval_set/test_split_interval_set_shared.cpp | 4
   8 files changed, 73 insertions(+), 393 deletions(-)

Modified: sandbox/itl/boost/itl/interval_maps.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_maps.hpp (original)
+++ sandbox/itl/boost/itl/interval_maps.hpp 2009-01-23 05:20:01 EST (Fri, 23 Jan 2009)
@@ -873,103 +873,6 @@
 }
 
 
-
-
-
-//-----------------------------------------------------------------------------
-// intersection *=
-//-----------------------------------------------------------------------------
-/*CL?
-template
-<
- class SubType, class DomainT, class CodomainT, class Traits,
- ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- class SectanT
->
-interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>&
-operator &=
-(
- interval_base_map<SubType,DomainT,CodomainT,
- Traits,Compare,Combine,Section,Interval,Alloc>& object,
- const SectanT& operand
-)
-{
- typedef interval_base_map<SubType,DomainT,CodomainT,
- Traits,Compare,Combine,Section,Interval,Alloc> object_type;
- object_type intersection;
- object.add_intersection(intersection,operand);
- object.swap(intersection);
- return object;
-}
-
-template
-<
- class SubType, class DomainT, class CodomainT, class Traits,
- ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- class SectanT
->
-interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
-operator &
-(
- const interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
- const SectanT& operand
-)
-{
- typedef interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
- return ObjectT(object) &= operand;
-}
-//-----------------------------------------------------------------------------
-
-template
-<
- class DomainT, class CodomainT, class Traits,
- ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template
- <
- class, class, class,
- ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
- >
- class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>&
-operator &=
-(
- IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
- const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
- typedef IntervalMap<DomainT,CodomainT,
- Traits,Compare,Combine,Section,Interval,Alloc> object_type;
- object_type intersection;
- object.add_intersection(intersection,operand);
- object.swap(intersection);
- return object;
-}
-*/
-
-template
-<
- class DomainT, class CodomainT, class Traits,
- ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template
- <
- class, class, class,
- ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
- >
- class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
-operator &
-(
- const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
- const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
- typedef IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
- return ObjectT(object) &= operand;
-}
-//-----------------------------------------------------------------------------
-
 //-----------------------------------------------------------------------------
 // is_element_equal
 //-----------------------------------------------------------------------------
@@ -1054,46 +957,6 @@
 }
 
 //--- IntervalSet -------------------------------------------------------------
-/*CL
-template
-<
- class SubType, class DomainT, class CodomainT, class Traits,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-//JODO boost::enable_if
-bool is_disjoint
-(
- interval_base_map<SubType,DomainT,CodomainT,
- Traits,Compare,Combine,Section,Interval,Alloc>& object,
- const IntervalSet<DomainT,Compare,Interval,Alloc>& operand
-)
-{
- typedef interval_base_map<SubType,DomainT,CodomainT,
- Traits,Compare,Combine,Section,Interval,Alloc> object_type;
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> operand_type;
- object_type intersection;
-
- if(operand.empty())
- return true;
-
- typename operand_type::const_iterator common_lwb;
- typename operand_type::const_iterator common_upb;
-
- if(!Set::common_range(common_lwb, common_upb, operand, object))
- return true;
-
- typename operand_type::const_iterator it = common_lwb;
- while(it != common_upb)
- {
- object.add_intersection(intersection, *it++);
- if(!intersection.empty())
- return false;
- }
-
- return true;
-}
-*/
-
 template
 <
     class DomainT, class CodomainT, class Traits,

Modified: sandbox/itl/boost/itl/interval_sets.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_sets.hpp (original)
+++ sandbox/itl/boost/itl/interval_sets.hpp 2009-01-23 05:20:01 EST (Fri, 23 Jan 2009)
@@ -40,30 +40,10 @@
     return object;
 }
 
-template
-<
- class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>&
-operator +=
-(
- IntervalSet<DomainT,Compare,Interval,Alloc>& object,
- const IntervalSet<DomainT,Compare,Interval,Alloc>& operand
-)
-{
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> operand_type;
- const_FORALL(typename operand_type, elem_, operand)
- object.add(*elem_);
-
- return object;
-}
-
 //--- interval_type -----------------------------------------------------------
 template
 <
- class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
+ class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
     template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
>
 IntervalSet<DomainT,Compare,Interval,Alloc>&
@@ -75,23 +55,6 @@
 {
     return object.add(interval);
 }
-
-template
-<
- class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>
-operator +
-(
- const IntervalSet<DomainT,Compare,Interval,Alloc>& object,
- const typename IntervalSet<DomainT,Compare,Interval,Alloc>::interval_type& operand
-)
-{
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> ObjectT;
- return ObjectT(object) += operand;
-}
 //-----------------------------------------------------------------------------
 
 //--- domain_type -------------------------------------------------------------
@@ -111,24 +74,6 @@
     return object.add(value);
 }
 
-template
-<
- class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>
-operator +
-(
- const IntervalSet<DomainT,Compare,Interval,Alloc>& object,
- const typename IntervalSet<DomainT,Compare,Interval,Alloc>::domain_type& operand
-)
-{
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> ObjectT;
- return ObjectT(object) += operand;
-}
-//-----------------------------------------------------------------------------
-
 //-----------------------------------------------------------------------------
 // addition |=
 //-----------------------------------------------------------------------------
@@ -146,24 +91,6 @@
 )
 { return object += operand; }
 
-template
-<
- class SubType, class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
-operator |
-(
- const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& object,
- const IntervalSet <DomainT,Compare,Interval,Alloc>& operand
-)
-{
- typedef interval_base_set<SubType,DomainT,Compare,Interval,Alloc> ObjectT;
- return ObjectT(object) += operand;
-}
-//-----------------------------------------------------------------------------
-
 //--- interval_type -----------------------------------------------------------
 template
 <
@@ -181,24 +108,6 @@
     return object.add(interval);
 }
 
-template
-<
- class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>
-operator |
-(
- const IntervalSet<DomainT,Compare,Interval,Alloc>& object,
- const typename IntervalSet<DomainT,Compare,Interval,Alloc>::interval_type& operand
-)
-{
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> ObjectT;
- return ObjectT(object) += operand;
-}
-//-----------------------------------------------------------------------------
-
 //--- domain_type -------------------------------------------------------------
 template
 <
@@ -215,25 +124,6 @@
 {
     return object.add(value);
 }
-
-template
-<
- class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>
-operator |
-(
- const IntervalSet<DomainT,Compare,Interval,Alloc>& object,
- const typename IntervalSet<DomainT,Compare,Interval,Alloc>::domain_type& operand
-)
-{
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> ObjectT;
- return ObjectT(object) += operand;
-}
-//-----------------------------------------------------------------------------
-
 //-----------------------------------------------------------------------------
 // difference -=
 //-----------------------------------------------------------------------------
@@ -293,24 +183,6 @@
     return object.subtract(interval);
 }
 
-template
-<
- class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>
-operator -
-(
- const IntervalSet<DomainT,Compare,Interval,Alloc>& object,
- const typename IntervalSet<DomainT,Compare,Interval,Alloc>::interval_type& operand
-)
-{
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> ObjectT;
- return ObjectT(object) -= operand;
-}
-//-----------------------------------------------------------------------------
-
 //--- domain_type -------------------------------------------------------------
 template
 <
@@ -328,42 +200,23 @@
     return object.subtract(value);
 }
 
-template
-<
- class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>
-operator -
-(
- const IntervalSet<DomainT,Compare,Interval,Alloc>& object,
- const typename IntervalSet<DomainT,Compare,Interval,Alloc>::domain_type& operand
-)
-{
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> ObjectT;
- return ObjectT(object) -= operand;
-}
-//-----------------------------------------------------------------------------
-
 //-----------------------------------------------------------------------------
 // intersection &=
 //-----------------------------------------------------------------------------
 template
 <
- class SubType, class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
+ class ObjectT,
+ class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
     template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
>
-interval_base_set<SubType,DomainT,Compare,Interval,Alloc>&
-operator &=
+ObjectT& operator &=
 (
- interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& object,
- const IntervalSet <DomainT,Compare,Interval,Alloc>& operand
+ ObjectT& object,
+ const IntervalSet<DomainT,Compare,Interval,Alloc>& operand
 )
 {
- typedef interval_base_set<SubType,DomainT,Compare,Interval,Alloc> object_type;
- typedef IntervalSet <DomainT,Compare,Interval,Alloc> operand_type;
+ typedef ObjectT object_type;
+ typedef IntervalSet<DomainT,Compare,Interval,Alloc> operand_type;
     object_type intersection;
 
     if(operand.empty())
@@ -390,24 +243,6 @@
     return object;
 }
 
-template
-<
- class SubType, class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
-operator &
-(
- const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& object,
- const IntervalSet <DomainT,Compare,Interval,Alloc>& operand
-)
-{
- typedef interval_base_set<SubType,DomainT,Compare,Interval,Alloc> ObjectT;
- return ObjectT(object) &= operand;
-}
-//-----------------------------------------------------------------------------
-
 //--- interval_type -----------------------------------------------------------
 template
 <
@@ -436,24 +271,6 @@
     return object;
 }
 
-template
-<
- class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>
-operator &
-(
- const IntervalSet<DomainT,Compare,Interval,Alloc>& object,
- const typename IntervalSet<DomainT,Compare,Interval,Alloc>::interval_type& operand
-)
-{
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> ObjectT;
- return ObjectT(object) &= operand;
-}
-//-----------------------------------------------------------------------------
-
 //--- domain_type -------------------------------------------------------------
 template
 <
@@ -472,25 +289,6 @@
         ::interval_type interval_type;
     return object &= interval_type(value);
 }
-
-template
-<
- class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>
-operator &
-(
- const IntervalSet<DomainT,Compare,Interval,Alloc>& object,
- const DomainT& operand
-)
-{
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> ObjectT;
- return ObjectT(object) &= operand;
-}
-//-----------------------------------------------------------------------------
-
 //-----------------------------------------------------------------------------
 // is_element_equal
 //-----------------------------------------------------------------------------
@@ -550,49 +348,6 @@
     return true;
 }
 
-/*CL used??? if so move it to interval_maps.hpp
-template
-<
- class SubType, class DomainT, class CodomainT, class Traits,
- ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section,
- template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-bool is_disjoint
-(
- interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& object,
- const IntervalMap<DomainT,CodomainT,
- Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
- typedef interval_base_set<SubType,DomainT,Compare,Interval,Alloc> object_type;
- typedef IntervalMap<DomainT,CodomainT,
- Traits,Compare,Interval,Alloc> operand_type;
- object_type intersection;
-
- if(operand.empty())
- return true;
-
- typename operand_type::const_iterator common_lwb;
- typename operand_type::const_iterator common_upb;
-
- if(!Set::common_range(common_lwb, common_upb, operand, object))
- return true;
-
- typename operand_type::const_iterator it = common_lwb;
- while(it != common_upb)
- {
- //JODO operand_type::key_value not working with gcc_3.4.4 (cygwin)
- //object.add_intersection(intersection, operand_type::key_value(it++));
- object.add_intersection(intersection, (it++)->KEY_VALUE);
- if(!intersection.empty())
- return false;
- }
-
- return true;
-}
-*/
-
 //-----------------------------------------------------------------------------
 // insert
 //-----------------------------------------------------------------------------

Modified: sandbox/itl/boost/itl/type_traits/is_combinable.hpp
==============================================================================
--- sandbox/itl/boost/itl/type_traits/is_combinable.hpp (original)
+++ sandbox/itl/boost/itl/type_traits/is_combinable.hpp 2009-01-23 05:20:01 EST (Fri, 23 Jan 2009)
@@ -234,9 +234,9 @@
 };
 
 template<class GuideT, class CompanionT>
-struct is_inter_combinable
+struct is_cross_combinable
 {
- typedef is_inter_combinable<GuideT,CompanionT> type;
+ typedef is_cross_combinable<GuideT,CompanionT> type;
         enum
         { value = mpl::and_
                   < is_interval_map<GuideT>
@@ -247,6 +247,21 @@
         };
 };
 
+template<class GuideT, class CompanionT>
+struct is_inter_combinable
+{
+ typedef is_inter_combinable<GuideT,CompanionT> type;
+ enum
+ { value = mpl::or_
+ <
+ mpl::and_<is_interval_map<GuideT>,
+ is_cross_combinable<GuideT, CompanionT> >
+ , mpl::and_<is_interval_set<GuideT>,
+ is_intra_combinable<GuideT, CompanionT> >
+ >::value
+ };
+};
+
 
 }} // namespace itl boost
 

Modified: sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp (original)
+++ sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp 2009-01-23 05:20:01 EST (Fri, 23 Jan 2009)
@@ -1226,4 +1226,17 @@
         split_a.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
 
         BOOST_CHECK_EQUAL(split_a + join_a, join_a + split_a);
-}
\ No newline at end of file
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_set_mixed_infix_et_overload_4_bicremental_types, T, bicremental_types)
+{
+ typedef int U;
+ typedef interval_map<T,U> IntervalMapT;
+ interval_map<T,U> join_a;
+ split_interval_map<T,U> split_a;
+
+ join_a .add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
+ split_a.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+ BOOST_CHECK_EQUAL(split_a & join_a, join_a & split_a);
+}

Modified: sandbox/itl/libs/itl/test/test_interval_set/test_interval_set_shared.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_set/test_interval_set_shared.cpp (original)
+++ sandbox/itl/libs/itl/test/test_interval_set/test_interval_set_shared.cpp 2009-01-23 05:20:01 EST (Fri, 23 Jan 2009)
@@ -46,3 +46,7 @@
 (test_itl_interval_set_infix_plus_overload_4_bicremental_types, T, bicremental_types)
 { interval_set_infix_plus_overload_4_bicremental_types<interval_set, T>();}
 
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_set_infix_et_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_infix_et_overload_4_bicremental_types<interval_set, T>();}
+

Modified: sandbox/itl/libs/itl/test/test_interval_set_shared.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_set_shared.hpp (original)
+++ sandbox/itl/libs/itl/test/test_interval_set_shared.hpp 2009-01-23 05:20:01 EST (Fri, 23 Jan 2009)
@@ -529,5 +529,26 @@
         BOOST_CHECK_EQUAL(set_b + MK_v(4), MK_v(4) + set_b);
 }
 
+template <template< class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, T),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet,
+ class T>
+void interval_set_infix_et_overload_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+ itl::interval<T> itv = I_D(3,5);
+
+ IntervalSetT set_a, set_b;
+ set_a.add(C_D(1,3)).add(I_D(8,9)).add(I_I(6,11));
+ set_b.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ BOOST_CHECK_EQUAL(set_a & set_b, set_b & set_a);
+ //This checks all cases of is_interval_set_derivative<T>
+ BOOST_CHECK_EQUAL(set_a & itv, itv & set_a);
+ BOOST_CHECK_EQUAL(set_b & MK_v(4), MK_v(4) & set_b);
+}
+
 #endif // __test_itl_interval_set_shared_h_JOFA_080920__
 

Modified: sandbox/itl/libs/itl/test/test_separate_interval_set/test_separate_interval_set_shared.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_separate_interval_set/test_separate_interval_set_shared.cpp (original)
+++ sandbox/itl/libs/itl/test/test_separate_interval_set/test_separate_interval_set_shared.cpp 2009-01-23 05:20:01 EST (Fri, 23 Jan 2009)
@@ -46,3 +46,8 @@
 (test_itl_interval_set_infix_plus_overload_4_bicremental_types, T, bicremental_types)
 { interval_set_infix_plus_overload_4_bicremental_types<separate_interval_set, T>();}
 
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_set_infix_et_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_infix_et_overload_4_bicremental_types<interval_set, T>();}
+
+

Modified: sandbox/itl/libs/itl/test/test_split_interval_set/test_split_interval_set_shared.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_split_interval_set/test_split_interval_set_shared.cpp (original)
+++ sandbox/itl/libs/itl/test/test_split_interval_set/test_split_interval_set_shared.cpp 2009-01-23 05:20:01 EST (Fri, 23 Jan 2009)
@@ -46,4 +46,8 @@
 (test_itl_interval_set_infix_plus_overload_4_bicremental_types, T, bicremental_types)
 { interval_set_infix_plus_overload_4_bicremental_types<split_interval_set, T>();}
 
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_set_infix_et_overload_4_bicremental_types, T, bicremental_types)
+{ interval_set_infix_et_overload_4_bicremental_types<interval_set, T>();}
+
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk