fix for tests that got broken with Int64 introduction
This commit is contained in:
Родитель
771d5ed0b0
Коммит
378077f209
|
@ -180,7 +180,9 @@ Int64 AbstractConfiguration::getInt64(const std::string& key, Int64 defaultValue
|
|||
|
||||
std::string value;
|
||||
if (getRaw(key, value))
|
||||
return NumberParser::tryParse64(internalExpand(value), defaultValue);
|
||||
return NumberParser::parse64(internalExpand(value));
|
||||
else
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
#endif // defined(POCO_HAVE_INT64)
|
||||
|
|
|
@ -36,12 +36,14 @@
|
|||
#include "Poco/AutoPtr.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/Delegate.h"
|
||||
#include "Poco/Types.h"
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
using Poco::Util::AbstractConfiguration;
|
||||
using Poco::Util::MapConfiguration;
|
||||
using Poco::AutoPtr;
|
||||
using Poco::Int64;
|
||||
|
||||
|
||||
AbstractConfigurationTest::AbstractConfigurationTest(const std::string& name): CppUnit::TestCase(name)
|
||||
|
@ -129,7 +131,7 @@ void AbstractConfigurationTest::testGetInt64()
|
|||
|
||||
try
|
||||
{
|
||||
int x = pConf->getInt64("prop1");
|
||||
Int64 x = pConf->getInt64("prop1");
|
||||
x=x;
|
||||
fail("not a number - must throw");
|
||||
}
|
||||
|
@ -372,7 +374,7 @@ void AbstractConfigurationTest::testRemove()
|
|||
pConf->keys(keys);
|
||||
assert (keys.size() == 13);
|
||||
pConf->keys("prop4", keys);
|
||||
assert (keys.size() == 13);
|
||||
assert (keys.size() == 15);
|
||||
|
||||
pConf->remove("prop4.bool1");
|
||||
assert (!pConf->hasProperty("prop4.bool1"));
|
||||
|
@ -381,7 +383,7 @@ void AbstractConfigurationTest::testRemove()
|
|||
pConf->keys(keys);
|
||||
assert (keys.size() == 13);
|
||||
pConf->keys("prop4", keys);
|
||||
assert (keys.size() == 12);
|
||||
assert (keys.size() == 14);
|
||||
|
||||
pConf->remove("prop4");
|
||||
assert (!pConf->hasProperty("prop4.bool1"));
|
||||
|
|
|
@ -124,7 +124,7 @@ void IniFileConfigurationTest::testCaseInsensitiveRemove()
|
|||
pConf->keys(keys);
|
||||
assert (keys.size() == 13);
|
||||
pConf->keys("prop4", keys);
|
||||
assert (keys.size() == 13);
|
||||
assert (keys.size() == 15);
|
||||
|
||||
pConf->remove("PROP4.Bool1");
|
||||
assert (pConf->hasProperty("Prop1"));
|
||||
|
@ -134,7 +134,7 @@ void IniFileConfigurationTest::testCaseInsensitiveRemove()
|
|||
pConf->keys(keys);
|
||||
assert (keys.size() == 13);
|
||||
pConf->keys("PROP4", keys);
|
||||
assert (keys.size() == 12);
|
||||
assert (keys.size() == 14);
|
||||
|
||||
pConf->remove("Prop4");
|
||||
assert (pConf->hasProperty("Prop1"));
|
||||
|
|
Загрузка…
Ссылка в новой задаче