From ce0a9be6dcc085aa5f96fa5e4e725982e6720d6c Mon Sep 17 00:00:00 2001 From: fgerlits Date: Thu, 11 Jan 2007 16:59:09 +0000 Subject: [PATCH] small bugfix; part of #722 --- campcaster/src/modules/core/etc/Makefile.in | 2 +- campcaster/src/modules/core/src/RdsContainerTest.cxx | 6 ++++-- campcaster/src/modules/core/src/RdsItem.cxx | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/campcaster/src/modules/core/etc/Makefile.in b/campcaster/src/modules/core/etc/Makefile.in index 8b8710984..185ea34ca 100644 --- a/campcaster/src/modules/core/etc/Makefile.in +++ b/campcaster/src/modules/core/etc/Makefile.in @@ -170,7 +170,7 @@ TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \ ${TMP_DIR}/SearchCriteriaTest.o \ ${TMP_DIR}/MetadataTypeContainerTest.o \ ${TMP_DIR}/AsyncStateTest.o \ - ${TMP_DIR}/RdsContainer.o + ${TMP_DIR}/RdsContainerTest.o TEST_RUNNER_RES = ${TMP_DIR}/${PACKAGE_NAME}_root.res \ ${TMP_DIR}/${PACKAGE_NAME}_en.res \ diff --git a/campcaster/src/modules/core/src/RdsContainerTest.cxx b/campcaster/src/modules/core/src/RdsContainerTest.cxx index 3e79a6cf6..9d2bae893 100644 --- a/campcaster/src/modules/core/src/RdsContainerTest.cxx +++ b/campcaster/src/modules/core/src/RdsContainerTest.cxx @@ -123,7 +123,9 @@ void RdsContainerTest :: firstTest(void) throw (CPPUNIT_NS::Exception) { - Ptr::Ref key(new Glib::ustring("PS")); - CPPUNIT_ASSERT(*rdsContainer->getRdsString(key) == "BBC Four"); + Ptr::Ref key(new const Glib::ustring("PS")); + Ptr::Ref value = rdsContainer->getRdsString(key); + CPPUNIT_ASSERT(value); + CPPUNIT_ASSERT(*value == "BBC Four"); } diff --git a/campcaster/src/modules/core/src/RdsItem.cxx b/campcaster/src/modules/core/src/RdsItem.cxx index 1c9bc7200..9dd0331af 100644 --- a/campcaster/src/modules/core/src/RdsItem.cxx +++ b/campcaster/src/modules/core/src/RdsItem.cxx @@ -97,7 +97,7 @@ RdsItem :: configure(const xmlpp::Element & element) xmlpp::Attribute * valueAttribute = element.get_attribute( valueAttributeName); if (valueAttribute) { - key.reset(new Glib::ustring(valueAttribute->get_value())); + value.reset(new Glib::ustring(valueAttribute->get_value())); } else { throw std::invalid_argument("missing " + valueAttributeName + " attribute");