diff --git a/test/algorithm/pop_back.cpp b/test/algorithm/pop_back.cpp index e2c16bc0..94fb4329 100644 --- a/test/algorithm/pop_back.cpp +++ b/test/algorithm/pop_back.cpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2006 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -49,6 +49,18 @@ main() BOOST_TEST((pop_back(l) == make_list(1))); } + { // make sure empty sequences are OK + list l(1); + std::cout << pop_back(l) << std::endl; + BOOST_TEST((pop_back(l) == make_list())); + } + + // $$$ JDG: TODO add compile fail facility $$$ + //~ { // compile fail check (Disabled for now) + //~ list<> l; + //~ std::cout << pop_back(l) << std::endl; + //~ } + return boost::report_errors(); }