diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-12 12:48:48 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-12 12:48:48 +0000 |
| commit | 93e5dbed325f29c1bf867a2847d3b839d545cfb2 (patch) | |
| tree | f657b55b41a05cf364403a36edf9d0921f426e7d /test/ServerStatManTest.cc | |
| parent | f6f5a7e5eeec4f14418fec5a7be1bbe57a7ea7e1 (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/ServerStatManTest.cc')
| -rw-r--r-- | test/ServerStatManTest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/ServerStatManTest.cc b/test/ServerStatManTest.cc index ce6fbc7e..02f111ca 100644 --- a/test/ServerStatManTest.cc +++ b/test/ServerStatManTest.cc @@ -47,13 +47,13 @@ void ServerStatManTest::testAddAndFind() { SharedHandle<ServerStat> r = ssm.find("localhost", "http"); - CPPUNIT_ASSERT(!r.isNull()); + CPPUNIT_ASSERT(r); CPPUNIT_ASSERT_EQUAL(std::string("localhost"), r->getHostname()); CPPUNIT_ASSERT_EQUAL(std::string("http"), r->getProtocol()); } { SharedHandle<ServerStat> r = ssm.find("mirror", "ftp"); - CPPUNIT_ASSERT(r.isNull()); + CPPUNIT_ASSERT(!r); } } @@ -122,7 +122,7 @@ void ServerStatManTest::testLoad() CPPUNIT_ASSERT(ssm.load(ss)); SharedHandle<ServerStat> localhost_http = ssm.find("localhost", "http"); - CPPUNIT_ASSERT(!localhost_http.isNull()); + CPPUNIT_ASSERT(localhost_http); CPPUNIT_ASSERT_EQUAL(std::string("localhost"), localhost_http->getHostname()); CPPUNIT_ASSERT_EQUAL(std::string("http"), localhost_http->getProtocol()); CPPUNIT_ASSERT_EQUAL(static_cast<unsigned int>(25000), @@ -138,7 +138,7 @@ void ServerStatManTest::testLoad() CPPUNIT_ASSERT_EQUAL(ServerStat::OK, localhost_http->getStatus()); SharedHandle<ServerStat> mirror = ssm.find("mirror", "http"); - CPPUNIT_ASSERT(!mirror.isNull()); + CPPUNIT_ASSERT(mirror); CPPUNIT_ASSERT_EQUAL(ServerStat::ERROR, mirror->getStatus()); } @@ -163,9 +163,9 @@ void ServerStatManTest::testRemoveStaleServerStat() ssm.removeStaleServerStat(24*60*60); - CPPUNIT_ASSERT(!ssm.find("localhost", "http").isNull()); - CPPUNIT_ASSERT(ssm.find("localhost", "ftp").isNull()); - CPPUNIT_ASSERT(ssm.find("mirror", "http").isNull()); + CPPUNIT_ASSERT(ssm.find("localhost", "http")); + CPPUNIT_ASSERT(!ssm.find("localhost", "ftp")); + CPPUNIT_ASSERT(!ssm.find("mirror", "http")); } } // namespace aria2 |
