test_xml_parser_rapidxml.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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. #include "test_xml_parser_common.hpp"
  12. #include <locale>
  13. #define BOOST_UTF8_BEGIN_NAMESPACE namespace boost { namespace property_tree {
  14. #define BOOST_UTF8_END_NAMESPACE }}
  15. #define BOOST_UTF8_DECL
  16. #include <boost/detail/utf8_codecvt_facet.hpp>
  17. #include <boost/detail/utf8_codecvt_facet.ipp>
  18. int test_main(int argc, char *argv[])
  19. {
  20. using namespace boost::property_tree;
  21. test_xml_parser<ptree>();
  22. test_xml_parser<iptree>();
  23. #ifndef BOOST_NO_CWCHAR
  24. using std::locale;
  25. // We need a UTF-8-aware global locale now.
  26. locale loc(locale(), new utf8_codecvt_facet);
  27. locale::global(loc);
  28. test_xml_parser<wptree>();
  29. test_xml_parser<wiptree>();
  30. #endif
  31. return 0;
  32. }