Update of /cvsroot/boost/boost/libs/xpressive/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28542
Modified Files:
test_symbols.cpp
Log Message:
Index: test_symbols.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/xpressive/test/test_symbols.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- test_symbols.cpp 22 Jun 2007 00:38:16 -0000 1.1
+++ test_symbols.cpp 25 Jun 2007 22:09:29 -0000 1.2
@@ -247,10 +247,11 @@
}
}
+#ifndef BOOST_XPRESSIVE_NO_WREGEX
struct City
{
- std::string name;
- char* nickname;
+ std::wstring name;
+ char const* nickname;
int population;
};
@@ -262,21 +263,23 @@
using namespace boost::xpressive;
City cities[] = {
- {"Chicago", "The Windy City", 945000},
- {"New York", "The Big Apple", 16626000},
- {"\u041c\u043E\u0441\u043A\u0432\u0430", "Moscow", 9299000}
+ {L"Chicago", "The Windy City", 945000},
+ {L"New York", "The Big Apple", 16626000},
+ {L"\u041c\u043E\u0441\u043A\u0432\u0430", "Moscow", 9299000}
};
- std::map<std::string, City> map1;
+ std::map<std::wstring, City> map1;
BOOST_FOREACH(const City & c, cities)
+ {
map1[c.name] = c;
+ }
- std::string str("Chicago \u041c\u043E\u0441\u043A\u0432\u0430");
+ std::wstring str(L"Chicago \u041c\u043E\u0441\u043A\u0432\u0430");
City result1, result2;
//int result1p;
// ERROR "error C2039: 'population' : is not a member of
'boost::proto::expr<Tag,Args>' c:\boost\libs\xpressive\test\test_symbols.cpp
277"
//sregex rx = (a1= map1)[ ref(result1p) = a1.population ];
- sregex rx = (a1= map1)[ ref(result1) = a1 ] >> +_s
+ wsregex rx = (a1= map1)[ ref(result1) = a1 ] >> +_s
>> (a1= map1)[ ref(result2) = a1 ];
if(!regex_match(str, rx))
{
@@ -288,6 +291,12 @@
BOOST_CHECK_EQUAL(result2.nickname, "Moscow");
}
}
+#else
+void test8()
+{
+ // This test is empty
+}
+#endif
///////////////////////////////////////////////////////////////////////////////
// test9
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs