diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-08 08:18:07 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-03-08 08:18:07 +0000 |
commit | 49b878b1b0f2e52bbd5282c22ac32a68e1e8736c (patch) | |
tree | 1eb26926f9d703c61b329a0f07178090b57cd55d /sca-cpp/trunk/components/cache/client-test.cpp | |
parent | 5b33dc5c5a87fff146951ca0543bf558454c331d (diff) |
Change ATOM and RSS feed representations to use name value pairs instead of just strings, to allow support for all ATOM and RSS attributes and avoid confusion with non-feed string results.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1079292 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/components/cache/client-test.cpp')
-rw-r--r-- | sca-cpp/trunk/components/cache/client-test.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/sca-cpp/trunk/components/cache/client-test.cpp b/sca-cpp/trunk/components/cache/client-test.cpp index fce911a302..bef5aa454a 100644 --- a/sca-cpp/trunk/components/cache/client-test.cpp +++ b/sca-cpp/trunk/components/cache/client-test.cpp @@ -43,10 +43,13 @@ const string memocacheuri("http://localhost:8090/memocache"); bool testCache(const string& uri) { http::CURLSession cs("", "", ""); - const list<value> i = list<value>() + const list<value> i = list<value>() + "content" + (list<value>() + "item" + (list<value>() + "name" + string("Apple")) - + (list<value>() + "price" + string("$2.99")); - const list<value> a = mklist<value>(string("item"), string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b"), i); + + (list<value>() + "price" + string("$2.99"))); + const list<value> a = list<value>() + (list<value>() + "entry" + + (list<value>() + "title" + string("item")) + + (list<value>() + "id" + string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b")) + + i); const failable<value> id = http::post(a, uri, cs); assert(hasContent(id)); @@ -58,10 +61,13 @@ bool testCache(const string& uri) { assert(content(val) == a); } - const list<value> j = list<value>() + const list<value> j = list<value>() + "content" + (list<value>() + "item" + (list<value>() + "name" + string("Apple")) - + (list<value>() + "price" + string("$3.55")); - const list<value> b = mklist<value>(string("item"), string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b"), j); + + (list<value>() + "price" + string("$3.55"))); + const list<value> b = list<value>() + (list<value>() + "entry" + + (list<value>() + "title" + string("item")) + + (list<value>() + "id" + string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b")) + + j); { const failable<value> r = http::put(b, uri + p, cs); @@ -123,10 +129,13 @@ struct getLoop { }; bool testGetPerf() { - const list<value> i = list<value>() + const list<value> i = list<value>() + "content" + (list<value>() + "item" + (list<value>() + "name" + string("Apple")) - + (list<value>() + "price" + string("$4.55")); - const value a = mklist<value>(string("item"), string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b"), i); + + (list<value>() + "price" + string("$4.55"))); + const list<value> a = list<value>() + (list<value>() + "entry" + + (list<value>() + "title" + string("item")) + + (list<value>() + "id" + string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b")) + + i); http::CURLSession cs("", "", ""); const failable<value> id = http::post(a, memcacheuri, cs); |