summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/components
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/components/cache/client-test.cpp27
-rw-r--r--sca-cpp/trunk/components/chat/client-test.cpp11
-rw-r--r--sca-cpp/trunk/components/filedb/client-test.cpp27
-rw-r--r--sca-cpp/trunk/components/log/client-test.cpp18
-rw-r--r--sca-cpp/trunk/components/nosqldb/client-test.cpp27
-rw-r--r--sca-cpp/trunk/components/queue/client-test.cpp11
-rw-r--r--sca-cpp/trunk/components/sqldb/client-test.cpp27
7 files changed, 98 insertions, 50 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);
diff --git a/sca-cpp/trunk/components/chat/client-test.cpp b/sca-cpp/trunk/components/chat/client-test.cpp
index 2c91fda1f2..cd1021c147 100644
--- a/sca-cpp/trunk/components/chat/client-test.cpp
+++ b/sca-cpp/trunk/components/chat/client-test.cpp
@@ -45,10 +45,13 @@ const value pass2("sca2");
const value jid3("sca3@localhost");
const value pass3("sca3");
-const list<value> item = list<value>()
- + (list<value>() + "name" + string("Apple"))
- + (list<value>() + "price" + string("$2.99"));
-const list<value> entry = mklist<value>(string("item"), string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b"), item);
+const list<value> item = list<value>() + "content" + (list<value>() + "item"
+ + (list<value>() + "name" + string("Apple"))
+ + (list<value>() + "price" + string("$2.99")));
+const list<value> entry = list<value>() + (list<value>() + "entry"
+ + (list<value>() + "title" + string("item"))
+ + (list<value>() + "id" + string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b"))
+ + item);
worker w(2);
bool received;
diff --git a/sca-cpp/trunk/components/filedb/client-test.cpp b/sca-cpp/trunk/components/filedb/client-test.cpp
index a65ec45341..97141eba97 100644
--- a/sca-cpp/trunk/components/filedb/client-test.cpp
+++ b/sca-cpp/trunk/components/filedb/client-test.cpp
@@ -41,10 +41,13 @@ const string uri("http://localhost:8090/filedb");
bool testFileDB() {
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 testFileDB() {
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);
diff --git a/sca-cpp/trunk/components/log/client-test.cpp b/sca-cpp/trunk/components/log/client-test.cpp
index 5f13f64ac1..09651f4f43 100644
--- a/sca-cpp/trunk/components/log/client-test.cpp
+++ b/sca-cpp/trunk/components/log/client-test.cpp
@@ -41,10 +41,13 @@ const string uri("http://localhost:8090/log");
bool testLog() {
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));
@@ -66,10 +69,13 @@ struct logLoop {
};
bool testLogPerf() {
- 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 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);
http::CURLSession cs("", "", "");
const failable<value> id = http::post(a, uri, cs);
diff --git a/sca-cpp/trunk/components/nosqldb/client-test.cpp b/sca-cpp/trunk/components/nosqldb/client-test.cpp
index 8eed7ce8cd..b64f838f46 100644
--- a/sca-cpp/trunk/components/nosqldb/client-test.cpp
+++ b/sca-cpp/trunk/components/nosqldb/client-test.cpp
@@ -41,10 +41,13 @@ const string uri("http://localhost:8090/nosqldb");
bool testNoSqlDb() {
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 testNoSqlDb() {
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);
diff --git a/sca-cpp/trunk/components/queue/client-test.cpp b/sca-cpp/trunk/components/queue/client-test.cpp
index 286faa2930..d44fd0f37a 100644
--- a/sca-cpp/trunk/components/queue/client-test.cpp
+++ b/sca-cpp/trunk/components/queue/client-test.cpp
@@ -46,10 +46,13 @@ namespace queue {
const value key(mklist<value>(string("report")));
const string qname("reportq");
-const list<value> item = list<value>()
- + (list<value>() + "name" + string("Apple"))
- + (list<value>() + "price" + string("$2.99"));
-const list<value> entry = mklist<value>(string("item"), string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b"), item);
+const list<value> item = list<value>() + "content" + (list<value>() + "item"
+ + (list<value>() + "name" + string("Apple"))
+ + (list<value>() + "price" + string("$2.99")));
+const list<value> entry = list<value>() + (list<value>() + "entry"
+ + (list<value>() + "title" + string("item"))
+ + (list<value>() + "id" + string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b"))
+ + item);
bool testDeclareQueue() {
QpidConnection qc;
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);