small bugfix; part of #722

This commit is contained in:
fgerlits 2007-01-11 16:59:09 +00:00
parent 4014b907d8
commit ce0a9be6dc
3 changed files with 6 additions and 4 deletions

View File

@ -170,7 +170,7 @@ TEST_RUNNER_OBJS = ${TMP_DIR}/TestRunner.o \
${TMP_DIR}/SearchCriteriaTest.o \ ${TMP_DIR}/SearchCriteriaTest.o \
${TMP_DIR}/MetadataTypeContainerTest.o \ ${TMP_DIR}/MetadataTypeContainerTest.o \
${TMP_DIR}/AsyncStateTest.o \ ${TMP_DIR}/AsyncStateTest.o \
${TMP_DIR}/RdsContainer.o ${TMP_DIR}/RdsContainerTest.o
TEST_RUNNER_RES = ${TMP_DIR}/${PACKAGE_NAME}_root.res \ TEST_RUNNER_RES = ${TMP_DIR}/${PACKAGE_NAME}_root.res \
${TMP_DIR}/${PACKAGE_NAME}_en.res \ ${TMP_DIR}/${PACKAGE_NAME}_en.res \

View File

@ -123,7 +123,9 @@ void
RdsContainerTest :: firstTest(void) RdsContainerTest :: firstTest(void)
throw (CPPUNIT_NS::Exception) throw (CPPUNIT_NS::Exception)
{ {
Ptr<const Glib::ustring>::Ref key(new Glib::ustring("PS")); Ptr<const Glib::ustring>::Ref key(new const Glib::ustring("PS"));
CPPUNIT_ASSERT(*rdsContainer->getRdsString(key) == "BBC Four"); Ptr<const Glib::ustring>::Ref value = rdsContainer->getRdsString(key);
CPPUNIT_ASSERT(value);
CPPUNIT_ASSERT(*value == "BBC Four");
} }

View File

@ -97,7 +97,7 @@ RdsItem :: configure(const xmlpp::Element & element)
xmlpp::Attribute * valueAttribute = element.get_attribute( xmlpp::Attribute * valueAttribute = element.get_attribute(
valueAttributeName); valueAttributeName);
if (valueAttribute) { if (valueAttribute) {
key.reset(new Glib::ustring(valueAttribute->get_value())); value.reset(new Glib::ustring(valueAttribute->get_value()));
} else { } else {
throw std::invalid_argument("missing " throw std::invalid_argument("missing "
+ valueAttributeName + " attribute"); + valueAttributeName + " attribute");