|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57131 - in branches/release/libs/spirit/test: . karma qi
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-24 10:41:57
Author: hkaiser
Date: 2009-10-24 10:41:56 EDT (Sat, 24 Oct 2009)
New Revision: 57131
URL: http://svn.boost.org/trac/boost/changeset/57131
Log:
Spirit: merging test fixes from trunk
Properties modified:
branches/release/libs/spirit/test/ (props changed)
branches/release/libs/spirit/test/qi/optional.cpp (props changed)
Text files modified:
branches/release/libs/spirit/test/karma/case_handling.cpp | 15 +++++++++++++++
branches/release/libs/spirit/test/karma/char_class.cpp | 7 +++++++
branches/release/libs/spirit/test/qi/char_class.cpp | 7 +++++++
branches/release/libs/spirit/test/qi/no_case.cpp | 14 ++++++++++++++
4 files changed, 43 insertions(+), 0 deletions(-)
Modified: branches/release/libs/spirit/test/karma/case_handling.cpp
==============================================================================
--- branches/release/libs/spirit/test/karma/case_handling.cpp (original)
+++ branches/release/libs/spirit/test/karma/case_handling.cpp 2009-10-24 10:41:56 EDT (Sat, 24 Oct 2009)
@@ -8,6 +8,7 @@
#include <boost/config/warning_disable.hpp>
#include <boost/detail/lightweight_test.hpp>
+#include <boost/detail/workaround.hpp>
#include <boost/spirit/include/karma_char.hpp>
#include <boost/spirit/include/karma_string.hpp>
@@ -164,6 +165,10 @@
BOOST_TEST(test(L"\t", upper[upper[space]], L'\t'));
}
+// needed for VC7.1 only
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("german")
+#endif
{
using namespace boost::spirit::iso8859_1;
@@ -173,6 +178,9 @@
BOOST_TEST(test("Ä", upper['Ä']));
BOOST_TEST(test("Ä", upper['ä']));
}
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("")
+#endif
{
using namespace boost::spirit::ascii;
@@ -248,6 +256,10 @@
BOOST_TEST(test("A1- ", upper[upper[string("A1- ")]]));
}
+// needed for VC7.1 only
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("german")
+#endif
{
using namespace boost::spirit::iso8859_1;
@@ -257,6 +269,9 @@
BOOST_TEST(test("ÄÄ", upper["Ää"]));
BOOST_TEST(test("ÄÄ", upper["Ää"]));
}
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("")
+#endif
{
using namespace boost::spirit::ascii;
Modified: branches/release/libs/spirit/test/karma/char_class.cpp
==============================================================================
--- branches/release/libs/spirit/test/karma/char_class.cpp (original)
+++ branches/release/libs/spirit/test/karma/char_class.cpp 2009-10-24 10:41:56 EDT (Sat, 24 Oct 2009)
@@ -140,9 +140,16 @@
BOOST_TEST(!test("", xdigit, 'g'));
+// needed for VC7.1 only
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("german")
+#endif
BOOST_TEST(test("é", alpha, 'é'));
BOOST_TEST(test("é", lower, 'é'));
BOOST_TEST(!test("", upper, 'é'));
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("")
+#endif
}
{
Modified: branches/release/libs/spirit/test/qi/char_class.cpp
==============================================================================
--- branches/release/libs/spirit/test/qi/char_class.cpp (original)
+++ branches/release/libs/spirit/test/qi/char_class.cpp 2009-10-24 10:41:56 EDT (Sat, 24 Oct 2009)
@@ -106,9 +106,16 @@
BOOST_TEST(test("f", xdigit));
BOOST_TEST(!test("g", xdigit));
+// needed for VC7.1 only
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("german")
+#endif
BOOST_TEST(test("é", alpha));
BOOST_TEST(test("é", lower));
BOOST_TEST(!test("é", upper));
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("")
+#endif
}
{
Modified: branches/release/libs/spirit/test/qi/no_case.cpp
==============================================================================
--- branches/release/libs/spirit/test/qi/no_case.cpp (original)
+++ branches/release/libs/spirit/test/qi/no_case.cpp 2009-10-24 10:41:56 EDT (Sat, 24 Oct 2009)
@@ -52,6 +52,10 @@
BOOST_TEST(!test("z", no_case['x']));
}
+// needed for VC7.1 only
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("french")
+#endif
{
using namespace boost::spirit::iso8859_1;
BOOST_TEST(test("Á", no_case[char_('á')]));
@@ -61,9 +65,13 @@
using namespace boost::spirit::iso8859_1;
BOOST_TEST(test("X", no_case[char_("a-z")]));
BOOST_TEST(!test("1", no_case[char_("a-z")]));
+
BOOST_TEST(test("É", no_case[char_("å-ï")]));
BOOST_TEST(!test("ÿ", no_case[char_("å-ï")]));
}
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("")
+#endif
{
using namespace boost::spirit::ascii;
@@ -72,11 +80,17 @@
BOOST_TEST(!test("Vavoo", no_case[lit("bochi bochi")]));
}
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("french")
+#endif
{
using namespace boost::spirit::iso8859_1;
BOOST_TEST(test("Áá", no_case[lit("áÁ")]));
BOOST_TEST(test("áá", no_case[no_case[lit("áÁ")]]));
}
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310))
+#pragma setlocale("")
+#endif
{
// should work!
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk