1 // (C) Copyright Raffi Enficiaud 2014. 2 // Distributed under the Boost Software License, Version 1.0. 3 // (See accompanying file LICENSE_1_0.txt or copy at 4 // http://www.boost.org/LICENSE_1_0.txt) 5 6 // See http://www.boost.org/libs/test for the library home page. 7 8 //[example_code 9 #define BOOST_TEST_MODULE boost_test_sequence 10 #include <boost/test/included/unit_test.hpp> 11 #include <vector> 12 BOOST_AUTO_TEST_CASE(test_collections_vectors)13BOOST_AUTO_TEST_CASE( test_collections_vectors ) 14 { 15 std::vector<int> a{1,2,3}, c{1,5,3,4}; 16 std::vector<long> b{1,5,3}; 17 18 // the following does not compile 19 //BOOST_TEST(a == b); 20 //BOOST_TEST(a <= b); 21 22 // stl defaults to lexicographical comparison 23 BOOST_TEST(a < c); 24 BOOST_TEST(a >= c); 25 BOOST_TEST(a != c); 26 } 27 //] 28