From 11cf64b7303d3c6bd2620d6c711c9845775f2d3d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 27 Oct 2017 10:37:26 +0200 Subject: Better fix for CppunitTest_services ...than 25313923b08018bd837cfe3fc99a5e141602cafc "Fix CppunitTest_services for constructor-based implementations..." (which this commit reverts again). My claim that "the 'factory' would be the object itself" is nonsense, it would rather be an ImplementationWrapper (but one that was freshly created for each ServiceManager::createContentEnumeration). Change-Id: I85c683cff6f9ba78d0f8567a53f8fcbc56fe55cf --- postprocess/qa/services.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'postprocess') diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx index 78dee9ed3ad1..0ab677339d9d 100644 --- a/postprocess/qa/services.cxx +++ b/postprocess/qa/services.cxx @@ -209,6 +209,13 @@ void Test::test() { k = impls.insert( std::make_pair(name, Implementation(j, servs))) .first; + } else { + CPPUNIT_ASSERT_MESSAGE( + (OString( + "multiple implementations named \"" + msg(name) + + "\"") + .getStr()), + bool(j == k->second.factory)); } CPPUNIT_ASSERT_MESSAGE( (OString( -- cgit v1.2.3