diff options
author | David Tardon <dtardon@redhat.com> | 2016-11-19 20:35:07 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-11-21 09:44:39 +0100 |
commit | c87ecb0e18b11bc8ff4043ae17be097c73faf2d1 (patch) | |
tree | 845f00f3df127c4fc51c161bdb5a34f76663d1b0 /include | |
parent | d015317f36e0160cd76a421eb2060e8539748eb2 (diff) |
remove dep on unotest from osl_Pipe test
Change-Id: I5f5862a684e52bd3d1336fa9f8cffa77cdebbe4c
Diffstat (limited to 'include')
-rw-r--r-- | include/osl/test/uniquepipename.hxx (renamed from include/unotest/uniquepipename.hxx) | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/include/unotest/uniquepipename.hxx b/include/osl/test/uniquepipename.hxx index f406dc1dd69b..bdffb28ca2c0 100644 --- a/include/unotest/uniquepipename.hxx +++ b/include/osl/test/uniquepipename.hxx @@ -17,21 +17,25 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_UNOTEST_UNIQUEPIPENAME_HXX -#define INCLUDED_UNOTEST_UNIQUEPIPENAME_HXX - -#include <sal/config.h> - -#include <rtl/ustring.hxx> -#include <unotest/detail/unotestdllapi.hxx> +#include "sal/types.h" +#include "cppunit/TestAssert.h" +#include "osl/process.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +namespace osl { namespace test { -// Create a system-wide unique name (for use with osl::Pipe): -OOO_DLLPUBLIC_UNOTEST OUString uniquePipeName(OUString const & name); - +OUString uniquePipeName(OUString const & name) { + oslProcessInfo info; + info.Size = sizeof info; + CPPUNIT_ASSERT_EQUAL( + osl_Process_E_None, + osl_getProcessInfo(nullptr, osl_Process_IDENTIFIER, &info)); + return name + OUString::number(info.Ident); } -#endif +} +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |