summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/components/sqldb/client-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/components/sqldb/client-test.cpp')
-rw-r--r--sca-cpp/trunk/components/sqldb/client-test.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/sca-cpp/trunk/components/sqldb/client-test.cpp b/sca-cpp/trunk/components/sqldb/client-test.cpp
index 4e5c067633..9e2cbdc248 100644
--- a/sca-cpp/trunk/components/sqldb/client-test.cpp
+++ b/sca-cpp/trunk/components/sqldb/client-test.cpp
@@ -41,10 +41,13 @@ const string uri("http://localhost:8090/sqldb");
bool testSqlDb() {
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));
@@ -56,10 +59,13 @@ bool testSqlDb() {
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);
@@ -99,10 +105,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, uri, cs);