From 910ecec91d3de8d43eee9eef9201dd3fb1e00060 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Thu, 30 Dec 2010 08:52:44 +0000 Subject: Support ATOM and RSS entries with no content or description. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1053822 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/atom/atom-test.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'sca-cpp/trunk/modules/atom/atom-test.cpp') diff --git a/sca-cpp/trunk/modules/atom/atom-test.cpp b/sca-cpp/trunk/modules/atom/atom-test.cpp index 4acc720816..762331d528 100644 --- a/sca-cpp/trunk/modules/atom/atom-test.cpp +++ b/sca-cpp/trunk/modules/atom/atom-test.cpp @@ -56,6 +56,13 @@ string itemTextEntry("\n" "" "\n"); +string itemNoContentEntry("\n" + "" + "item" + "cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b" + "" + "\n"); + string incompleteEntry("" "item" "" @@ -93,6 +100,12 @@ bool testEntry() { writeATOMEntry(writer, &os, a); assert(str(os) == itemTextEntry); } + { + const list a = mklist(string("item"), string("cart-53d67a61-aa5e-4e5e-8401-39edeba8b83b"), list()); + ostringstream os; + writeATOMEntry(writer, &os, a); + assert(str(os) == itemNoContentEntry); + } { const list a = content(readATOMEntry(mklist(itemEntry))); ostringstream os; @@ -105,6 +118,12 @@ bool testEntry() { writeATOMEntry(writer, &os, a); assert(str(os) == itemTextEntry); } + { + const list a = content(readATOMEntry(mklist(itemNoContentEntry))); + ostringstream os; + writeATOMEntry(writer, &os, a); + assert(str(os) == itemNoContentEntry); + } { const list a = content(readATOMEntry(mklist(incompleteEntry))); ostringstream os; -- cgit v1.2.3