equal.cpp 904 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright Aleksey Gurtovoy 2000-2004
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // See http://www.boost.org/libs/mpl for documentation.
  8. // $Id$
  9. // $Date$
  10. // $Revision$
  11. #include <boost/mpl/equal.hpp>
  12. #include <boost/mpl/list.hpp>
  13. #include <boost/mpl/aux_/test.hpp>
  14. MPL_TEST_CASE()
  15. {
  16. typedef list<int,float,long,double,char,long,double,float> list1;
  17. typedef list<int,float,long,double,char,long,double,float> list2;
  18. typedef list<int,float,long,double,char,long,double,short> list3;
  19. typedef list<int,float,long,double,char,long,double> list4;
  20. MPL_ASSERT(( equal<list1,list2> ));
  21. MPL_ASSERT(( equal<list2,list1> ));
  22. MPL_ASSERT_NOT(( equal<list2,list3> ));
  23. MPL_ASSERT_NOT(( equal<list3,list4> ));
  24. MPL_ASSERT_NOT(( equal<list4,list3> ));
  25. }