| 1 | // ---------------------------------------------------------------------------- |
|---|---|
| 2 | // Copyright (C) 2002-2006 Marcin Kalicinski |
| 3 | // Copyright (C) 2009-2010 Sebastian Redl |
| 4 | // |
| 5 | // Distributed under the Boost Software License, Version 1.0. |
| 6 | // (See accompanying file LICENSE_1_0.txt or copy at |
| 7 | // http://www.boost.org/LICENSE_1_0.txt) |
| 8 | // |
| 9 | // For more information, see www.boost.org |
| 10 | // ---------------------------------------------------------------------------- |
| 11 | |
| 12 | #include "test_xml_parser_common.hpp" |
| 13 | #include <locale> |
| 14 | #define BOOST_UTF8_BEGIN_NAMESPACE namespace boost { namespace property_tree { |
| 15 | #define BOOST_UTF8_END_NAMESPACE }} |
| 16 | #define BOOST_UTF8_DECL |
| 17 | #include <boost/detail/utf8_codecvt_facet.hpp> |
| 18 | #include <boost/detail/utf8_codecvt_facet.ipp> |
| 19 | |
| 20 | int main(int , char *[]) |
| 21 | { |
| 22 | using namespace boost::property_tree; |
| 23 | test_xml_parser<ptree>(); |
| 24 | test_xml_parser<iptree>(); |
| 25 | #ifndef BOOST_NO_CWCHAR |
| 26 | using std::locale; |
| 27 | // We need a UTF-8-aware global locale now. |
| 28 | locale loc(locale(), new utf8_codecvt_facet); |
| 29 | locale::global(loc: loc); |
| 30 | test_xml_parser<wptree>(); |
| 31 | test_xml_parser<wiptree>(); |
| 32 | #endif |
| 33 | return boost::report_errors(); |
| 34 | } |
| 35 |
