Handle OptionHandlers as raw pointer

This commit is contained in:
Tatsuhiro Tsujikawa 2012-09-27 22:45:31 +09:00
parent 8fc5cdea02
commit ae2e4cb7ff
17 changed files with 1035 additions and 1030 deletions

View file

@ -310,16 +310,15 @@ void OptionHandlerTest::testHttpProxyOptionHandler()
void OptionHandlerTest::testDeprecatedOptionHandler()
{
{
DeprecatedOptionHandler handler
(SharedHandle<OptionHandler>(new DefaultOptionHandler(PREF_TIMEOUT)));
DeprecatedOptionHandler handler(new DefaultOptionHandler(PREF_TIMEOUT));
Option option;
handler.parse(option, "foo");
CPPUNIT_ASSERT(!option.defined(PREF_TIMEOUT));
}
{
DeprecatedOptionHandler handler
(SharedHandle<OptionHandler>(new DefaultOptionHandler(PREF_TIMEOUT)),
SharedHandle<OptionHandler>(new DefaultOptionHandler(PREF_DIR)));
DefaultOptionHandler dir(PREF_DIR);
DeprecatedOptionHandler handler(new DefaultOptionHandler(PREF_TIMEOUT),
&dir);
Option option;
handler.parse(option, "foo");
CPPUNIT_ASSERT(!option.defined(PREF_TIMEOUT));