std::string ConversionProperties::getValue(std::string key) const { ConversionOption *option = getOption(key); if (option != NULL) return option->getValue(); return ""; }
const std::string& ConversionProperties::getValue(const std::string& key) const { ConversionOption *option = getOption(key); if (option != NULL) return option->getValue(); 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; }