diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-07-15 23:17:20 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-07-16 13:42:11 +0200 |
commit | 21834f14c97071c5bcf13ef02bf940dc1922663f (patch) | |
tree | d9120a580c00f2e864b2b2bd94399ca4c12ef1d5 /svl | |
parent | 188208d93a5d95e1f5eb39294c5e467d6d53edef (diff) |
tools: replace boost::ptr_vector with std::unordered_map
Change-Id: I530c5f95dda9aa80654e3a2a20a2e236221e7305
Diffstat (limited to 'svl')
-rw-r--r-- | svl/qa/unit/test_INetContentType.cxx | 12 |
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); |