std::string ConversionProperties::getDescription(std::string key) const { ConversionOption *option = getOption(key); if (option != NULL) return option->getDescription(); return ""; }
const std::string& ConversionProperties::getDescription(const std::string& key) const { ConversionOption *option = getOption(key); if (option != NULL) return option->getDescription(); static std::string empty = ""; return empty; }
END_TEST START_TEST (test_conversion_options_clone) { ConversionOption option("key", 1.1, "some description"); fail_unless(option.getDoubleValue() == 1.1); fail_unless(option.getType() == CNV_TYPE_DOUBLE); ConversionOption *clone = option.clone(); fail_unless(option.getKey() == clone->getKey()); fail_unless(option.getType() == clone->getType()); fail_unless(option.getValue() == clone->getValue()); fail_unless(option.getDescription() == clone->getDescription()); delete clone; }