summaryrefslogtreecommitdiff
path: root/svl/qa/unit/test_INetContentType.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-07-15 23:17:20 +0200
committerMichael Stahl <mstahl@redhat.com>2015-07-16 00:06:21 +0200
commit218be53fe00aebed43df0b041de609b30f99ce95 (patch)
treead9098da3c0868c211065414fc7be6bbfff40cef /svl/qa/unit/test_INetContentType.cxx
parent5c8325325868753d2891556400c91651bce58402 (diff)
tools: replace boost::ptr_vector with std::unordered_map
Change-Id: I530c5f95dda9aa80654e3a2a20a2e236221e7305
Diffstat (limited to 'svl/qa/unit/test_INetContentType.cxx')
-rw-r--r--svl/qa/unit/test_INetContentType.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/svl/qa/unit/test_INetContentType.cxx b/svl/qa/unit/test_INetContentType.cxx
index b7aa71cd6e66..68badb6745c6 100644
--- a/svl/qa/unit/test_INetContentType.cxx
+++ b/svl/qa/unit/test_INetContentType.cxx
@@ -48,8 +48,7 @@ void Test::testBad() {
CPPUNIT_ASSERT(!INetContentTypes::parse(in, t, s, &ps));
CPPUNIT_ASSERT(t.isEmpty());
CPPUNIT_ASSERT(s.isEmpty());
- CPPUNIT_ASSERT_EQUAL(
- static_cast<INetContentTypeParameter const *>(0), ps.find("foo"));
+ CPPUNIT_ASSERT(ps.end() == ps.find("foo"));
}
void Test::testFull() {
@@ -63,9 +62,9 @@ void Test::testFull() {
CPPUNIT_ASSERT(INetContentTypes::parse(in, t, s, &ps));
CPPUNIT_ASSERT_EQUAL(OUString("foo"), t);
CPPUNIT_ASSERT_EQUAL(OUString("bar"), s);
- INetContentTypeParameter const * p = ps.find("baz");
- CPPUNIT_ASSERT(p != 0);
- CPPUNIT_ASSERT_EQUAL(OUString("boz"), p->m_sValue);
+ auto iter = ps.find("baz");
+ CPPUNIT_ASSERT(iter != ps.end());
+ CPPUNIT_ASSERT_EQUAL(OUString("boz"), iter->second.m_sValue);
}
void Test::testFollow() {
@@ -79,8 +78,7 @@ void Test::testFollow() {
CPPUNIT_ASSERT(!INetContentTypes::parse(in, t, s));
CPPUNIT_ASSERT(t.isEmpty());
CPPUNIT_ASSERT(s.isEmpty());
- CPPUNIT_ASSERT_EQUAL(
- static_cast<INetContentTypeParameter const *>(0), ps.find("baz"));
+ CPPUNIT_ASSERT(ps.end() == ps.find("baz"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);