summaryrefslogtreecommitdiff
path: root/test/AuthConfigFactoryTest.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-12 12:48:48 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-12 12:48:48 +0000
commit93e5dbed325f29c1bf867a2847d3b839d545cfb2 (patch)
treef657b55b41a05cf364403a36edf9d0921f426e7d /test/AuthConfigFactoryTest.cc
parentf6f5a7e5eeec4f14418fec5a7be1bbe57a7ea7e1 (diff)
2010-11-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed SharedHandle::isNull(). Instead we added operator* and operator unspecified_bool_type. Removed use of WeakHandle and replaced with raw pointer.
Diffstat (limited to 'test/AuthConfigFactoryTest.cc')
-rw-r--r--test/AuthConfigFactoryTest.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/AuthConfigFactoryTest.cc b/test/AuthConfigFactoryTest.cc
index 1ed6b666..0de3238d 100644
--- a/test/AuthConfigFactoryTest.cc
+++ b/test/AuthConfigFactoryTest.cc
@@ -41,7 +41,7 @@ void AuthConfigFactoryTest::testCreateAuthConfig_http()
AuthConfigFactory factory;
// without auth info
- CPPUNIT_ASSERT(factory.createAuthConfig(req, &option).isNull());
+ CPPUNIT_ASSERT(!factory.createAuthConfig(req, &option));
// with Netrc
SharedHandle<Netrc> netrc(new Netrc());
@@ -55,7 +55,7 @@ void AuthConfigFactoryTest::testCreateAuthConfig_http()
factory.setNetrc(netrc);
// not activated
- CPPUNIT_ASSERT(factory.createAuthConfig(req, &option).isNull());
+ CPPUNIT_ASSERT(!factory.createAuthConfig(req, &option));
CPPUNIT_ASSERT(factory.activateBasicCred("localhost", "/", &option));
@@ -67,13 +67,13 @@ void AuthConfigFactoryTest::testCreateAuthConfig_http()
CPPUNIT_ASSERT(!factory.activateBasicCred("mirror", "/", &option));
- CPPUNIT_ASSERT(factory.createAuthConfig(req, &option).isNull());
+ CPPUNIT_ASSERT(!factory.createAuthConfig(req, &option));
// with Netrc + user defined
option.put(PREF_HTTP_USER, "userDefinedUser");
option.put(PREF_HTTP_PASSWD, "userDefinedPassword");
- CPPUNIT_ASSERT(factory.createAuthConfig(req, &option).isNull());
+ CPPUNIT_ASSERT(!factory.createAuthConfig(req, &option));
CPPUNIT_ASSERT(factory.activateBasicCred("mirror", "/", &option));
@@ -97,7 +97,7 @@ void AuthConfigFactoryTest::testCreateAuthConfig_httpNoChallenge()
AuthConfigFactory factory;
// without auth info
- CPPUNIT_ASSERT(factory.createAuthConfig(req, &option).isNull());
+ CPPUNIT_ASSERT(!factory.createAuthConfig(req, &option));
// with Netrc
SharedHandle<Netrc> netrc(new Netrc());
@@ -117,7 +117,7 @@ void AuthConfigFactoryTest::testCreateAuthConfig_httpNoChallenge()
// See default token in netrc is ignored.
req->setUri("http://mirror/");
- CPPUNIT_ASSERT(factory.createAuthConfig(req, &option).isNull());
+ CPPUNIT_ASSERT(!factory.createAuthConfig(req, &option));
// with Netrc + user defined
option.put(PREF_HTTP_USER, "userDefinedUser");
@@ -231,10 +231,10 @@ void AuthConfigFactoryTest::testUpdateBasicCred()
factory.createAuthConfig(req, &option)->getAuthText());
req->setUri("http://local/");
- CPPUNIT_ASSERT(factory.createAuthConfig(req, &option).isNull());
+ CPPUNIT_ASSERT(!factory.createAuthConfig(req, &option));
req->setUri("http://mirror/");
- CPPUNIT_ASSERT(factory.createAuthConfig(req, &option).isNull());
+ CPPUNIT_ASSERT(!factory.createAuthConfig(req, &option));
}
} // namespace aria2