]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/lexical_cast/test/lexical_cast_abstract_test.cpp
1 // Unit test for boost::lexical_cast.
3 // See http://www.boost.org for most recent version, including documentation.
5 // Copyright Sergey Shandar 2005, Alexander Nasonov, 2007.
7 // Distributed under the Boost
8 // Software License, Version 1.0. (See accompanying file
9 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt).
11 // Test abstract class. Bug 1358600:
12 // http://sf.net/tracker/?func=detail&aid=1358600&group_id=7586&atid=107586
14 #include <boost/config.hpp>
16 #if defined(__INTEL_COMPILER)
17 #pragma warning(disable: 193 383 488 981 1418 1419)
18 #elif defined(BOOST_MSVC)
19 #pragma warning(disable: 4097 4100 4121 4127 4146 4244 4245 4511 4512 4701 4800)
22 #include <boost/lexical_cast.hpp>
23 #include <boost/test/unit_test.hpp>
25 using namespace boost
;
29 unit_test::test_suite
*init_unit_test_suite(int, char *[])
31 unit_test::test_suite
*suite
=
32 BOOST_TEST_SUITE("lexical_cast unit test");
33 suite
->add(BOOST_TEST_CASE(&test_abstract
));
41 virtual void out(std::ostream
&) const = 0;
48 virtual void out(std::ostream
&O
) const { O
<< "B"; }
51 std::ostream
&operator<<(std::ostream
&O
, const A
&a
)
60 BOOST_CHECK(boost::lexical_cast
<std::string
>(a
) == "B");