diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-03-31 13:56:10 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-03-31 13:56:10 +0000 |
commit | 28f6b9fac451f6c84ec0893cb71f01fe12a34611 (patch) | |
tree | a3074e04976bd691d45c7cb863b536e525184ab4 /cpp/test/Freeze/dbmap/Client.cpp | |
parent | Fixed load comparison (diff) | |
download | ice-28f6b9fac451f6c84ec0893cb71f01fe12a34611.tar.bz2 ice-28f6b9fac451f6c84ec0893cb71f01fe12a34611.tar.xz ice-28f6b9fac451f6c84ec0893cb71f01fe12a34611.zip |
Allow wstring as key/value in freeze maps
Diffstat (limited to 'cpp/test/Freeze/dbmap/Client.cpp')
-rw-r--r-- | cpp/test/Freeze/dbmap/Client.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cpp/test/Freeze/dbmap/Client.cpp b/cpp/test/Freeze/dbmap/Client.cpp index d9031c554d5..44da534afa9 100644 --- a/cpp/test/Freeze/dbmap/Client.cpp +++ b/cpp/test/Freeze/dbmap/Client.cpp @@ -14,6 +14,7 @@ #include <IntIdentityMap.h> #include <IntIdentityMapWithIndex.h> #include <SortedMap.h> +#include <WstringWstringMap.h> #include <Freeze/TransactionHolder.h> #include <algorithm> @@ -723,6 +724,35 @@ run(const CommunicatorPtr& communicator, const string& envName) sm.clear(); } + cout << "ok" << endl; + + cout << "testing wstring... " << flush; + + { + WstringWstringMap wsm(connection, "wstringMap"); + + TransactionHolder txHolder(connection); + wsm.put(WstringWstringMap::value_type(L"AAAAA", L"aaaaa")); + wsm.put(WstringWstringMap::value_type(L"BBBBB", L"bbbbb")); + wsm.put(WstringWstringMap::value_type(L"CCCCC", L"ccccc")); + wsm.put(WstringWstringMap::value_type(L"DDDDD", L"ddddd")); + wsm.put(WstringWstringMap::value_type(L"EEEEE", L"eeeee")); + txHolder.commit(); + } + + { + WstringWstringMap wsm(connection, "wstringMap"); + { + WstringWstringMap::iterator p = wsm.find(L"BBBBB"); + test(p != wsm.end()); + test(p->second == L"bbbbb"); + + p = wsm.findByValue(L"ddddd"); + test(p != wsm.end()); + test(p->first == L"DDDDD"); + } + wsm.clear(); + } cout << "ok" << endl; |