summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/cppunittester/cppunittester.cxx65
-rw-r--r--sal/cppunittester/makefile.mk (renamed from sal/qa/rtl/textenc/gcc3_export.map)25
-rw-r--r--sal/inc/osl/semaphor.h19
-rw-r--r--sal/inc/osl/semaphor.hxx4
-rw-r--r--sal/osl/os2/process_impl.cxx5
-rw-r--r--sal/osl/unx/process.c11
-rw-r--r--sal/osl/unx/process_impl.cxx4
-rw-r--r--sal/osl/w32/pipe.c2
-rw-r--r--sal/osl/w32/process.cxx4
-rw-r--r--sal/osl/w32/procimpl.cxx22
-rw-r--r--sal/prj/build.lst8
-rw-r--r--sal/prj/d.lst2
-rw-r--r--sal/qa/ByteSequence/ByteSequence.cxx26
-rw-r--r--sal/qa/ByteSequence/export.exp1
-rw-r--r--sal/qa/ByteSequence/makefile.mk15
-rw-r--r--sal/qa/ByteSequence/rtl_old_testbyteseq.cxx12
-rw-r--r--sal/qa/OStringBuffer/export.exp1
-rw-r--r--sal/qa/OStringBuffer/makefile.mk13
-rw-r--r--sal/qa/OStringBuffer/rtl_OStringBuffer.cxx102
-rw-r--r--sal/qa/OStringBuffer/rtl_String_Const.h1
-rw-r--r--sal/qa/OStringBuffer/rtl_String_Utils.cxx2
-rwxr-xr-xsal/qa/export.map4
-rw-r--r--sal/qa/osl/module/export_dll.map2
-rwxr-xr-xsal/qa/osl/mutex/makefile.mk15
-rwxr-xr-xsal/qa/osl/mutex/osl_Mutex.cxx34
-rwxr-xr-xsal/qa/osl/mutex/osl_Mutex_Const.h4
-rw-r--r--sal/qa/osl/pipe/export.exp1
-rw-r--r--sal/qa/osl/pipe/makefile.mk12
-rw-r--r--sal/qa/osl/pipe/osl_Pipe.cxx121
-rw-r--r--sal/qa/osl/pipe/osl_Pipe.xsce9
-rw-r--r--sal/qa/osl/pipe/osl_Pipe_Const.h1
-rw-r--r--sal/qa/osl/profile/makefile.mk12
-rw-r--r--sal/qa/osl/profile/osl_old_testprofile.cxx15
-rw-r--r--sal/qa/osl/semaphore/makefile.mk61
-rw-r--r--sal/qa/osl/semaphore/osl_Semaphore.cxx525
-rw-r--r--sal/qa/osl/semaphore/osl_Semaphore_Const.h73
-rwxr-xr-xsal/qa/rtl/alloc/makefile.mk2
-rw-r--r--sal/qa/rtl/bootstrap/makefile.mk2
-rw-r--r--sal/qa/rtl/cipher/makefile.mk2
-rwxr-xr-xsal/qa/rtl/crc32/makefile.mk2
-rw-r--r--sal/qa/rtl/digest/makefile.mk2
-rw-r--r--sal/qa/rtl/doublelock/makefile.mk2
-rw-r--r--sal/qa/rtl/locale/makefile.mk2
-rw-r--r--sal/qa/rtl/logfile/makefile.mk2
-rw-r--r--sal/qa/rtl/math/makefile.mk2
-rw-r--r--sal/qa/rtl/ostring/makefile.mk2
-rw-r--r--sal/qa/rtl/oustring/makefile.mk2
-rw-r--r--sal/qa/rtl/oustringbuffer/makefile.mk2
-rw-r--r--sal/qa/rtl/process/makefile.mk2
-rw-r--r--sal/qa/rtl/random/makefile.mk2
-rw-r--r--sal/qa/rtl/strings/makefile.mk2
-rw-r--r--sal/qa/rtl/textenc/makefile.mk10
-rw-r--r--sal/qa/rtl/uri/makefile.mk2
-rw-r--r--sal/qa/rtl/uuid/makefile.mk2
-rw-r--r--sal/util/makefile.mk16
55 files changed, 388 insertions, 905 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
new file mode 100644
index 000000000000..1082e6ff9844
--- /dev/null
+++ b/sal/cppunittester/cppunittester.cxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#include "precompiled_sal.hxx"
+#include "sal/config.h"
+
+#include <cstdlib>
+#include <iostream>
+
+#include "cppunit/CompilerOutputter.h"
+#include "cppunit/TestResult.h"
+#include "cppunit/TestResultCollector.h"
+#include "cppunit/TestRunner.h"
+#include "cppunit/extensions/TestFactoryRegistry.h"
+#include "cppunit/plugin/PlugInManager.h"
+#include "cppunit/portability/Stream.h"
+#include "osl/thread.h"
+#include "rtl/process.h"
+#include "rtl/string.hxx"
+#include "rtl/ustring.hxx"
+#include "sal/main.h"
+
+SAL_IMPLEMENT_MAIN() {
+ if (rtl_getAppCommandArgCount() != 1) {
+ std::cerr << "Usage: cppunittester <shared-library-path>" << std::endl;
+ return EXIT_FAILURE;
+ }
+ rtl::OUString path;
+ rtl_getAppCommandArg(0, &path.pData);
+ CppUnit::PlugInManager manager;
+ manager.load(
+ rtl::OUStringToOString(path, osl_getThreadTextEncoding()).getStr());
+ CppUnit::TestRunner runner;
+ runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
+ CppUnit::TestResult result;
+ CppUnit::TestResultCollector collector;
+ result.addListener(&collector);
+ runner.run(result);
+ CppUnit::CompilerOutputter(&collector, CppUnit::stdCErr()).write();
+ return collector.wasSuccessful() ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/sal/qa/rtl/textenc/gcc3_export.map b/sal/cppunittester/makefile.mk
index e7f19d73264e..938b63d90ae9 100644
--- a/sal/qa/rtl/textenc/gcc3_export.map
+++ b/sal/cppunittester/makefile.mk
@@ -23,14 +23,23 @@
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
-#*************************************************************************
+#***********************************************************************/
+
+PRJ = ..
+PRJNAME = sal
+TARGET = cppunittester
+
+ENABLE_EXCEPTIONS = TRUE
+
+.INCLUDE: settings.mk
+
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
-UDK_3_0_0 {
- global:
- registerAllTestFunction;
+OBJFILES = $(APP1OBJS)
- _ZN4_STL7num_put*; # STLport
+APP1OBJS = $(OBJ)/cppunittester.obj
+APP1RPATH = NONE
+APP1STDLIBS = $(CPPUNITLIB) $(SALLIB)
+APP1TARGET = cppunittester
- local:
- *;
-};
+.INCLUDE: target.mk
diff --git a/sal/inc/osl/semaphor.h b/sal/inc/osl/semaphor.h
index 2986ae4bec6c..c0c74515404a 100644
--- a/sal/inc/osl/semaphor.h
+++ b/sal/inc/osl/semaphor.h
@@ -37,6 +37,10 @@ extern "C" {
typedef void* oslSemaphore;
/** Creates a semaphore.<BR>
+
+ @deprecated
+ Must not be used, as unnamed semaphores are not supported on Mac OS X.
+
@param InitialCount denotes the starting value the semaphore. If you set it to
zero, the first acquire() blocks. Otherwise InitialCount acquire()s are
immedeatly successfull.
@@ -45,12 +49,20 @@ typedef void* oslSemaphore;
oslSemaphore SAL_CALL osl_createSemaphore(sal_uInt32 initialCount);
/** Release the OS-structures and free semaphore data-structure
+
+ @deprecated
+ Must not be used, as unnamed semaphores are not supported on Mac OS X.
+
@return fbbb
*/
void SAL_CALL osl_destroySemaphore(oslSemaphore Semaphore);
/** acquire() decreases the count. It will block if it tries to
decrease below zero.
+
+ @deprecated
+ Must not be used, as unnamed semaphores are not supported on Mac OS X.
+
@return False if the system-call failed.
*/
sal_Bool SAL_CALL osl_acquireSemaphore(oslSemaphore Semaphore);
@@ -59,10 +71,17 @@ sal_Bool SAL_CALL osl_acquireSemaphore(oslSemaphore Semaphore);
return with False if it would decrease the count below zero.
(When acquire() would block.) If it could successfully
decrease the count, it will return True.
+
+ @deprecated
+ Must not be used, as unnamed semaphores are not supported on Mac OS X.
*/
sal_Bool SAL_CALL osl_tryToAcquireSemaphore(oslSemaphore Semaphore);
/** release() increases the count.
+
+ @deprecated
+ Must not be used, as unnamed semaphores are not supported on Mac OS X.
+
@return False if the system-call failed.
*/
sal_Bool SAL_CALL osl_releaseSemaphore(oslSemaphore Semaphore);
diff --git a/sal/inc/osl/semaphor.hxx b/sal/inc/osl/semaphor.hxx
index 6209aa9970a8..a45737d27524 100644
--- a/sal/inc/osl/semaphor.hxx
+++ b/sal/inc/osl/semaphor.hxx
@@ -35,7 +35,11 @@
namespace osl
{
+ /** C++ wrapper class around C semaphore functions.
+ @deprecated
+ Must not be used, as unnamed semaphores are not supported on Mac OS X.
+ */
class Semaphore {
public:
diff --git a/sal/osl/os2/process_impl.cxx b/sal/osl/os2/process_impl.cxx
index d27bd72190e5..27b12bbe0f6a 100644
--- a/sal/osl/os2/process_impl.cxx
+++ b/sal/osl/os2/process_impl.cxx
@@ -141,6 +141,7 @@ oslProcessError SAL_CALL osl_getExecutableFile (rtl_uString ** ppustrFile)
oslProcessError result = osl_Process_E_NotFound;
osl_acquireMutex(g_command_args.m_mutex);
+ OSL_ASSERT(g_command_args.m_nCount > 0);
if (g_command_args.m_nCount > 0)
{
/* CommandArgs set. Obtain argv[0]. */
@@ -160,6 +161,7 @@ sal_uInt32 SAL_CALL osl_getCommandArgCount (void)
sal_uInt32 result = 0;
osl_acquireMutex(g_command_args.m_mutex);
+ OSL_ASSERT(g_command_args.m_nCount > 0);
if (g_command_args.m_nCount > 0)
result = g_command_args.m_nCount - 1;
osl_releaseMutex(g_command_args.m_mutex);
@@ -175,6 +177,7 @@ oslProcessError SAL_CALL osl_getCommandArg (sal_uInt32 nArg, rtl_uString ** strC
oslProcessError result = osl_Process_E_NotFound;
osl_acquireMutex(g_command_args.m_mutex);
+ OSL_ASSERT(g_command_args.m_nCount > 0);
if (g_command_args.m_nCount > (nArg + 1))
{
rtl_uString_assign (strCommandArg, g_command_args.m_ppArgs[nArg + 1]);
@@ -190,7 +193,7 @@ oslProcessError SAL_CALL osl_getCommandArg (sal_uInt32 nArg, rtl_uString ** strC
**************************************/
void SAL_CALL osl_setCommandArgs (int argc, char ** argv)
{
-
+ OSL_ASSERT(argc > 0);
osl_acquireMutex(g_command_args.m_mutex);
OSL_ENSURE (g_command_args.m_nCount == 0, "osl_setCommandArgs(): CommandArgs already set.");
if (g_command_args.m_nCount == 0)
diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c
index 5262fef5cd38..300a1446e81a 100644
--- a/sal/osl/unx/process.c
+++ b/sal/osl/unx/process.c
@@ -489,7 +489,16 @@ static void ChildStatusProc(void *pData)
{
int i;
for (i = 0; data.m_pszEnv[i] != NULL; i++)
- putenv(data.m_pszEnv[i]);
+ {
+ if (strchr(data.m_pszEnv[i], '=') == NULL)
+ {
+ unsetenv(data.m_pszEnv[i]); /*TODO: check error return*/
+ }
+ else
+ {
+ putenv(data.m_pszEnv[i]); /*TODO: check error return*/
+ }
+ }
OSL_TRACE("ChildStatusProc : starting '%s'",data.m_pszArgs[0]);
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx
index adfc59e9c8af..e712b6748e7f 100644
--- a/sal/osl/unx/process_impl.cxx
+++ b/sal/osl/unx/process_impl.cxx
@@ -184,6 +184,7 @@ oslProcessError SAL_CALL osl_getExecutableFile (rtl_uString ** ppustrFile)
oslProcessError result = osl_Process_E_NotFound;
pthread_mutex_lock (&(g_command_args.m_mutex));
+ OSL_ASSERT(g_command_args.m_nCount > 0);
if (g_command_args.m_nCount > 0)
{
/* CommandArgs set. Obtain argv[0]. */
@@ -203,6 +204,7 @@ sal_uInt32 SAL_CALL osl_getCommandArgCount (void)
sal_uInt32 result = 0;
pthread_mutex_lock (&(g_command_args.m_mutex));
+ OSL_ASSERT(g_command_args.m_nCount > 0);
if (g_command_args.m_nCount > 0)
result = g_command_args.m_nCount - 1;
pthread_mutex_unlock (&(g_command_args.m_mutex));
@@ -218,6 +220,7 @@ oslProcessError SAL_CALL osl_getCommandArg (sal_uInt32 nArg, rtl_uString ** strC
oslProcessError result = osl_Process_E_NotFound;
pthread_mutex_lock (&(g_command_args.m_mutex));
+ OSL_ASSERT(g_command_args.m_nCount > 0);
if (g_command_args.m_nCount > (nArg + 1))
{
rtl_uString_assign (strCommandArg, g_command_args.m_ppArgs[nArg + 1]);
@@ -233,6 +236,7 @@ oslProcessError SAL_CALL osl_getCommandArg (sal_uInt32 nArg, rtl_uString ** strC
**************************************/
void SAL_CALL osl_setCommandArgs (int argc, char ** argv)
{
+ OSL_ASSERT(argc > 0);
pthread_mutex_lock (&(g_command_args.m_mutex));
OSL_ENSURE (g_command_args.m_nCount == 0, "osl_setCommandArgs(): CommandArgs already set.");
if (g_command_args.m_nCount == 0)
diff --git a/sal/osl/w32/pipe.c b/sal/osl/w32/pipe.c
index 8f9da54dd52d..bd5185a2ba2b 100644
--- a/sal/osl/w32/pipe.c
+++ b/sal/osl/w32/pipe.c
@@ -629,7 +629,7 @@ oslPipeError SAL_CALL osl_getLastPipeError(oslPipe pPipe)
pPipe->m_Error = osl_Pipe_E_None;
}
else
- Error = osl_Pipe_E_None;
+ Error = osl_Pipe_E_NotFound;
return (Error);
}
diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx
index b8b2d3893345..96187be7e203 100644
--- a/sal/osl/w32/process.cxx
+++ b/sal/osl/w32/process.cxx
@@ -322,6 +322,7 @@ oslProcessError SAL_CALL osl_getExecutableFile( rtl_uString **ppustrFile )
oslProcessError result = osl_Process_E_NotFound;
osl_acquireMutex (*osl_getGlobalMutex());
+ OSL_ASSERT(g_command_args.m_nCount > 0);
if (g_command_args.m_nCount > 0)
{
/* CommandArgs set. Obtain arv[0]. */
@@ -340,6 +341,7 @@ sal_uInt32 SAL_CALL osl_getCommandArgCount(void)
sal_uInt32 result = 0;
osl_acquireMutex (*osl_getGlobalMutex());
+ OSL_ASSERT(g_command_args.m_nCount > 0);
if (g_command_args.m_nCount > 0)
{
/* We're not counting argv[0] here. */
@@ -357,6 +359,7 @@ oslProcessError SAL_CALL osl_getCommandArg( sal_uInt32 nArg, rtl_uString **strCo
oslProcessError result = osl_Process_E_NotFound;
osl_acquireMutex (*osl_getGlobalMutex());
+ OSL_ASSERT(g_command_args.m_nCount > 0);
if (g_command_args.m_nCount > (nArg + 1))
{
/* We're not counting argv[0] here. */
@@ -372,6 +375,7 @@ oslProcessError SAL_CALL osl_getCommandArg( sal_uInt32 nArg, rtl_uString **strCo
void SAL_CALL osl_setCommandArgs (int argc, char ** argv)
{
+ OSL_ASSERT(argc > 0);
osl_acquireMutex (*osl_getGlobalMutex());
if (g_command_args.m_nCount == 0)
{
diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx
index f46c233ee932..fc04d5b84a8f 100644
--- a/sal/osl/w32/procimpl.cxx
+++ b/sal/osl/w32/procimpl.cxx
@@ -169,8 +169,7 @@ namespace /* private */
{
rtl::OUString env_var = rtl::OUString(env_vars[i]);
- if ((env_var.getLength() == 0) ||
- (env_var.indexOf(NAME_VALUE_SEPARATOR) == -1))
+ if (env_var.getLength() == 0)
return false;
iterator_pair_t iter_pair = std::equal_range(
@@ -179,10 +178,17 @@ namespace /* private */
env_var,
less_environment_variable());
- if (iter_pair.first != iter_pair.second) // found
- *iter_pair.first = env_var;
- else // not found
- merged_env->insert(iter_pair.first, env_var);
+ if (env_var.indexOf(NAME_VALUE_SEPARATOR) == -1)
+ {
+ merged_env->erase(iter_pair.first, iter_pair.second);
+ }
+ else
+ {
+ if (iter_pair.first != iter_pair.second) // found
+ *iter_pair.first = env_var;
+ else // not found
+ merged_env->insert(iter_pair.first, env_var);
+ }
}
return true;
}
@@ -198,9 +204,9 @@ namespace /* private */
if (!create_merged_environment(environment_vars, n_environment_vars, &merged_env))
return false;
- // reserve enough space for the '\0'-separated environment strings and
+ // allocate enough space for the '\0'-separated environment strings and
// a final '\0'
- environment.reserve(calc_sum_of_string_lengths(merged_env) + 1);
+ environment.resize(calc_sum_of_string_lengths(merged_env) + 1);
string_container_const_iterator_t iter = merged_env.begin();
string_container_const_iterator_t iter_end = merged_env.end();
diff --git a/sal/prj/build.lst b/sal/prj/build.lst
index 5622d80edeef..c96c3977f725 100644
--- a/sal/prj/build.lst
+++ b/sal/prj/build.lst
@@ -1,4 +1,4 @@
-sa sal : xml2cmp stlport external BOOST:boost NULL
+sa sal : xml2cmp stlport external BOOST:boost CPPUNIT:cppunit NULL
sa sal usr1 - all sa_mkout NULL
sa sal\inc nmake - all sa_inc NULL
sa sal\typesconfig nmake - u sa_tc sa_inc NULL
@@ -14,3 +14,9 @@ sa sal\qa nmake - all sa_qa sa_util NULL
sa sal\osl\unx nmake - u sa_oslu sa_tc.u sa_inc NULL
sa sal\osl\all nmake - all sa_oslall sa_tc.u sa_inc NULL
sa sal\util nmake - all sa_util sa_tc.u sa_oslall sa_uwinapi.n sa_kill.n sa_onlineupdate.n sa_osln.n sa_oslp.p sa_oslu.u sa_rtl sa_textenc NULL
+sa sal\cppunittester nmake - all sa_cppunittester sa_cpprt.u sa_util NULL
+sa sal\qa\ByteSequence nmake - all sa_qa_ByteSequence sa_cppunittester sa_util NULL
+sa sal\qa\OStringBuffer nmake - all sa_qa_OStringBuffer sa_cppunittester sa_util NULL
+sa sal\qa\osl\mutex nmake - all sa_qa_osl_mutex sa_cppunittester sa_util NULL
+sa sal\qa\osl\pipe nmake - all sa_qa_osl_pipe sa_cppunittester sa_util NULL
+sa sal\qa\osl\profile nmake - all sa_qa_osl_profile sa_cppunittester sa_util NULL
diff --git a/sal/prj/d.lst b/sal/prj/d.lst
index bcd9c0e2c95a..3ce270bbbfc4 100644
--- a/sal/prj/d.lst
+++ b/sal/prj/d.lst
@@ -34,3 +34,5 @@ symlink: %_DEST%\lib%_EXT%\libuno_sal.dylib.3 %_DEST%\lib%_EXT%\libuno_sal.dylib
..\%__SRC%\inc\udkversion.h %_DEST%\inc%_EXT%\sal\udkversion.h
+..\%__SRC%\bin\cppunittester %_DEST%\bin%_EXT%\cppunittester
+..\%__SRC%\bin\cppunittester.exe %_DEST%\bin%_EXT%\cppunittester.exe
diff --git a/sal/qa/ByteSequence/ByteSequence.cxx b/sal/qa/ByteSequence/ByteSequence.cxx
index 8c1bebf934c7..3a408edb3ef0 100644
--- a/sal/qa/ByteSequence/ByteSequence.cxx
+++ b/sal/qa/ByteSequence/ByteSequence.cxx
@@ -33,7 +33,10 @@
#include <rtl/byteseq.hxx>
-#include <testshl/simpleheader.hxx>
+#include "cppunit/TestAssert.h"
+#include "cppunit/TestFixture.h"
+#include "cppunit/extensions/HelperMacros.h"
+#include "cppunit/plugin/TestPlugIn.h"
using namespace rtl;
@@ -590,18 +593,13 @@ public:
}; // class getData
// -----------------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_ByteSequence::ctor, "rtl_ByteSequence");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_ByteSequence::assign, "rtl_ByteSequence");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_ByteSequence::equal, "rtl_ByteSequence");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_ByteSequence::notequal, "rtl_ByteSequence");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_ByteSequence::getArray, "rtl_ByteSequence");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_ByteSequence::realloc, "rtl_ByteSequence");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_ByteSequence::getData, "rtl_ByteSequence");
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_ByteSequence::ctor);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_ByteSequence::assign);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_ByteSequence::equal);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_ByteSequence::notequal);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_ByteSequence::getArray);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_ByteSequence::realloc);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_ByteSequence::getData);
} // namespace ByteSequence
-
-// -----------------------------------------------------------------------------
-
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sal/qa/ByteSequence/export.exp b/sal/qa/ByteSequence/export.exp
deleted file mode 100644
index a13529da5876..000000000000
--- a/sal/qa/ByteSequence/export.exp
+++ /dev/null
@@ -1 +0,0 @@
-registerAllTestFunction
diff --git a/sal/qa/ByteSequence/makefile.mk b/sal/qa/ByteSequence/makefile.mk
index 4727a0cc51b1..972444ca8b57 100644
--- a/sal/qa/ByteSequence/makefile.mk
+++ b/sal/qa/ByteSequence/makefile.mk
@@ -24,6 +24,11 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
PRJ=..$/..
PRJNAME=sal
@@ -40,31 +45,34 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
#----------------------------------- OStringBuffer -----------------------------------
SHL1OBJS= \
$(SLO)$/ByteSequence.obj
SHL1TARGET= rtl_ByteSequence
-SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME =$(SHL1TARGET)
-# DEF1EXPORTFILE= export.exp
SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
+SHL1RPATH = NONE
# --- BEGIN --------------------------------------------------------
SHL2OBJS= \
$(SLO)$/rtl_old_testbyteseq.obj
SHL2TARGET= rtl_old_testbyteseq
-SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
+SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB)
SHL2IMPLIB= i$(SHL2TARGET)
DEF2NAME =$(SHL2TARGET)
SHL2VERSIONMAP = $(PRJ)$/qa$/export.map
+SHL2RPATH = NONE
# END --------------------------------------------------------------
#------------------------------- All object files -------------------------------
@@ -76,3 +84,4 @@ SLOFILES=$(SHL1OBJS)
.INCLUDE : target.mk
.INCLUDE : _cppunit.mk
+.END
diff --git a/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx b/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx
index 0c5e7126ce2e..61c312162c78 100644
--- a/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx
+++ b/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx
@@ -34,13 +34,15 @@
#include <stdio.h>
-// #include <osl/diagnose.h>
+#include <osl/diagnose.h>
#include <rtl/byteseq.hxx>
using namespace ::rtl;
-#include <testshl/simpleheader.hxx>
-
+#include "cppunit/TestAssert.h"
+#include "cppunit/TestFixture.h"
+#include "cppunit/extensions/HelperMacros.h"
+#include "cppunit/plugin/TestPlugIn.h"
namespace rtl_testbyteseq
{
@@ -126,7 +128,7 @@ void oldbyteseq::test_bytesequence_001()
} // namespace osl_test_file
// -----------------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( rtl_testbyteseq::oldbyteseq, "rtl_ByteSequence" );
+CPPUNIT_TEST_SUITE_REGISTRATION( rtl_testbyteseq::oldbyteseq );
// -----------------------------------------------------------------------------
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sal/qa/OStringBuffer/export.exp b/sal/qa/OStringBuffer/export.exp
deleted file mode 100644
index a13529da5876..000000000000
--- a/sal/qa/OStringBuffer/export.exp
+++ /dev/null
@@ -1 +0,0 @@
-registerAllTestFunction
diff --git a/sal/qa/OStringBuffer/makefile.mk b/sal/qa/OStringBuffer/makefile.mk
index c7e3a2a37657..d46168dc4d0e 100644
--- a/sal/qa/OStringBuffer/makefile.mk
+++ b/sal/qa/OStringBuffer/makefile.mk
@@ -24,6 +24,11 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
PRJ=..$/..
PRJNAME=sal
@@ -40,6 +45,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
#------------------------------- All object files -------------------------------
# do this here, so we get right dependencies
# SLOFILES= \
@@ -52,15 +59,14 @@ SHL1OBJS= \
$(SLO)$/rtl_String_Utils.obj
SHL1TARGET= rtl_OStringBuffer
-SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME =$(SHL1TARGET)
-# DEF1EXPORTFILE= export.exp
SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
-
+SHL1RPATH = NONE
#------------------------------- All object files -------------------------------
# do this here, so we get right dependencies
@@ -71,3 +77,4 @@ SLOFILES=$(SHL1OBJS)
.INCLUDE : target.mk
.INCLUDE : _cppunit.mk
+.END
diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
index c2221aa68682..01a620e8a238 100644
--- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
+++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
@@ -35,7 +35,12 @@
#include <rtl/strbuf.hxx>
-#include <testshl/simpleheader.hxx>
+#include "cppunit/TestAssert.h"
+#include "cppunit/TestFixture.h"
+#include "cppunit/extensions/HelperMacros.h"
+#include "cppunit/plugin/TestPlugIn.h"
+
+#include <string.h>
using namespace rtl;
@@ -18404,67 +18409,34 @@ t_print("\n");
// -----------------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::ctors,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::makeStringAndClear,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::getLength,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::getCapacity,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::ensureCapacity,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::setLength,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::charAt,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::csuc,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::getStr,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::setCharAt,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_001,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_002,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_003,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_004,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_005,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_006_Int32,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Bounderies,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Negative,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_006_Int32_WrongRadix,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_006_Int32_defaultParam,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_007_Int64,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Bounderies,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Negative,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_007_Int64_WrongRadix,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_007_Int64_defaultParam,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_008_float,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_008_Float_Negative,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_009_double,
- "rtl_OStringBuffer");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(rtl_OStringBuffer::append_009_Double_Negative,
- "rtl_OStringBuffer");
-
-// -----------------------------------------------------------------------------
-
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-NOADDITIONAL;
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::ctors);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::makeStringAndClear);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getLength);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getCapacity);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::ensureCapacity);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::setLength);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::charAt);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::csuc);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::getStr);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::setCharAt);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_001);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_002);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_003);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_004);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_005);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Bounderies);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_Negative);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_WrongRadix);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_006_Int32_defaultParam);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Bounderies);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_Negative);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_WrongRadix);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_007_Int64_defaultParam);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_008_float);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_008_Float_Negative);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_009_double);
+CPPUNIT_TEST_SUITE_REGISTRATION(rtl_OStringBuffer::append_009_Double_Negative);
+
+CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sal/qa/OStringBuffer/rtl_String_Const.h b/sal/qa/OStringBuffer/rtl_String_Const.h
index 8e5a2977b27a..fb0f9409dded 100644
--- a/sal/qa/OStringBuffer/rtl_String_Const.h
+++ b/sal/qa/OStringBuffer/rtl_String_Const.h
@@ -542,7 +542,6 @@ static const sal_Int32 expValStrLastNormal[nStrLastNormalCount] =
0,-1,0,4,-1,-1,-1,-1,-1,3,15,11
};
//------------------------------------------------------------------------
-static const sal_Int32 kNonSInt64Max = LONG_MIN;
static const sal_Int32 kNonSInt32Max = INT_MIN;
static const sal_Int32 kNonSInt16Max = SHRT_MIN;
//------------------------------------------------------------------------
diff --git a/sal/qa/OStringBuffer/rtl_String_Utils.cxx b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
index 0dc2caaf83be..74b3e80e47c1 100644
--- a/sal/qa/OStringBuffer/rtl_String_Utils.cxx
+++ b/sal/qa/OStringBuffer/rtl_String_Utils.cxx
@@ -88,7 +88,7 @@ sal_Char* cpystr( sal_Char* dst, const sal_Char* src )
const sal_Char* psrc = src;
sal_Char* pdst = dst;
- while( *pdst++ = *psrc++ );
+ while( (*pdst++ = *psrc++) );
return ( dst );
}
diff --git a/sal/qa/export.map b/sal/qa/export.map
index 0e4fe0c88ff2..3308588ef6f8 100755
--- a/sal/qa/export.map
+++ b/sal/qa/export.map
@@ -25,9 +25,9 @@
#
#*************************************************************************
-UDK_3.0 {
+UDK_3_0_0 {
global:
- registerAllTestFunction;
+ cppunitTestPlugIn;
local:
*;
diff --git a/sal/qa/osl/module/export_dll.map b/sal/qa/osl/module/export_dll.map
index 9527d66debdc..87c701f21d91 100644
--- a/sal/qa/osl/module/export_dll.map
+++ b/sal/qa/osl/module/export_dll.map
@@ -25,7 +25,7 @@
#
#*************************************************************************
-UDK_3.0 {
+UDK_3_0_0 {
global:
firstfunc;
diff --git a/sal/qa/osl/mutex/makefile.mk b/sal/qa/osl/mutex/makefile.mk
index 4ec1e56c8a17..de4121e3a0b9 100755
--- a/sal/qa/osl/mutex/makefile.mk
+++ b/sal/qa/osl/mutex/makefile.mk
@@ -25,6 +25,10 @@
#
#*************************************************************************
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
PRJ=..$/..$/..
PRJNAME=sal
@@ -39,25 +43,24 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:Socket by codegen.pl
SHL1OBJS= \
$(SLO)$/osl_Mutex.obj
SHL1TARGET= osl_Mutex
-SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB)
.IF "$(GUI)" == "WNT"
SHL1STDLIBS += $(WS2_32LIB)
.ENDIF
-.IF "$(GUI)" == "UNX"
-SHL1STDLIBS += -ldl -lnsl
-.ENDIF
-
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
+SHL1RPATH = NONE
# auto generated Target:Socket
# END ------------------------------------------------------------------
@@ -66,3 +69,5 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
.INCLUDE : target.mk
.INCLUDE : _cppunit.mk
+
+.END
diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx
index 45292da9718a..df0d2fe8ef6b 100755
--- a/sal/qa/osl/mutex/osl_Mutex.cxx
+++ b/sal/qa/osl/mutex/osl_Mutex.cxx
@@ -31,6 +31,10 @@
//------------------------------------------------------------------------
// include files
//------------------------------------------------------------------------
+#include "cppunit/TestAssert.h"
+#include "cppunit/TestFixture.h"
+#include "cppunit/extensions/HelperMacros.h"
+#include "cppunit/plugin/TestPlugIn.h"
#include <osl_Mutex_Const.h>
using namespace osl;
@@ -46,17 +50,17 @@ inline void printUString( const ::rtl::OUString & str )
{
rtl::OString aString;
- t_print("#printUString_u# " );
+ printf("#printUString_u# " );
aString = ::rtl::OUStringToOString( str, RTL_TEXTENCODING_ASCII_US );
- t_print("%s\n", aString.getStr( ) );
+ printf("%s\n", aString.getStr( ) );
}
/** print Boolean value.
*/
inline void printBool( sal_Bool bOk )
{
- t_print("#printBool# " );
- ( sal_True == bOk ) ? t_print("YES!\n" ): t_print("NO!\n" );
+ printf("#printBool# " );
+ ( sal_True == bOk ) ? printf("YES!\n" ): printf("NO!\n" );
}
/** pause nSec seconds helper function.
@@ -75,7 +79,7 @@ namespace ThreadHelper
#if ( defined UNX ) || ( defined OS2 ) //Unix
sleep( _nSec );
#endif
- // t_print("# done\n" );
+ // printf("# done\n" );
}
void thread_sleep_tenth_sec(sal_Int32 _nTenthSec)
{
@@ -227,7 +231,7 @@ protected:
{
// block here if the mutex has been acquired
pMyMutex->acquire( );
- t_print("# Mutex acquired. \n" );
+ printf("# Mutex acquired. \n" );
pMyMutex->release( );
}
};
@@ -273,7 +277,7 @@ protected:
Mutex* pGlobalMutex;
pGlobalMutex = pGlobalMutex->getGlobalMutex( );
pGlobalMutex->acquire( );
- t_print("# Global Mutex acquired. \n" );
+ printf("# Global Mutex acquired. \n" );
pGlobalMutex->release( );
}
};
@@ -338,7 +342,7 @@ namespace osl_Mutex
bRes = sal_True;
/*for (sal_Int8 i=0; i<BUFFER_SIZE; i++)
- t_print("#data in buffer is %d\n", m_Data.buffer[i]);
+ printf("#data in buffer is %d\n", m_Data.buffer[i]);
*/
CPPUNIT_ASSERT_MESSAGE("Mutex ctor", bRes == sal_True);
@@ -692,7 +696,7 @@ protected:
void SAL_CALL run( )
{
// acquire the mutex
- // t_print("# ClearGuardThread" );
+ // printf("# ClearGuardThread" );
ClearableMutexGuard aGuard( pMyMutex );
ThreadHelper::thread_sleep( 5 );
@@ -768,7 +772,7 @@ namespace osl_ClearableGuard
TimeValue aTimeVal_after;
osl_getSystemTime( &aTimeVal_after );
sal_Int32 nSec = aTimeVal_after.Seconds - aTimeVal_befor.Seconds;
- t_print("nSec is %d\n", nSec);
+ printf("nSec is %"SAL_PRIdINT32"\n", nSec);
myThread.join();
@@ -834,7 +838,7 @@ protected:
void SAL_CALL run( )
{
// acquire the mutex
- t_print("# ResettableGuard" );
+ printf("# ResettableGuard" );
ResettableMutexGuard aGuard( pMyMutex );
// release the mutex
aGuard.clear( );
@@ -933,13 +937,11 @@ namespace osl_ResettableGuard
}; // class reset
// -----------------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_ResettableGuard::ctor, "osl_ResettableGuard");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_ResettableGuard::reset, "osl_ResettableGuard");
+CPPUNIT_TEST_SUITE_REGISTRATION(osl_ResettableGuard::ctor);
+CPPUNIT_TEST_SUITE_REGISTRATION(osl_ResettableGuard::reset);
} // namespace osl_ResettableGuard
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
// The following sets variables for GNU EMACS
// Local Variables:
diff --git a/sal/qa/osl/mutex/osl_Mutex_Const.h b/sal/qa/osl/mutex/osl_Mutex_Const.h
index 7ae2de6fba63..30d321775f01 100755
--- a/sal/qa/osl/mutex/osl_Mutex_Const.h
+++ b/sal/qa/osl/mutex/osl_Mutex_Const.h
@@ -1,5 +1,5 @@
/*************************************************************************
-*
+ *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -46,8 +46,6 @@
#endif
#include <osl/time.h>
-#include <testshl/simpleheader.hxx>
-
#ifdef UNX
#include <unistd.h>
#endif
diff --git a/sal/qa/osl/pipe/export.exp b/sal/qa/osl/pipe/export.exp
deleted file mode 100644
index a13529da5876..000000000000
--- a/sal/qa/osl/pipe/export.exp
+++ /dev/null
@@ -1 +0,0 @@
-registerAllTestFunction
diff --git a/sal/qa/osl/pipe/makefile.mk b/sal/qa/osl/pipe/makefile.mk
index 23ae77d2bbcc..6350cdba0233 100644
--- a/sal/qa/osl/pipe/makefile.mk
+++ b/sal/qa/osl/pipe/makefile.mk
@@ -25,6 +25,10 @@
#
#*************************************************************************
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
PRJ=..$/..$/..
PRJNAME=sal
@@ -39,20 +43,22 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:Pipe by codegen.pl
SHL1OBJS= \
$(SLO)$/osl_Pipe.obj
SHL1TARGET= osl_Pipe
-SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME =$(SHL1TARGET)
SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
-# DEF1EXPORTFILE= export.exp
+SHL1RPATH = NONE
# auto generated Target:Pipe
# END ------------------------------------------------------------------
@@ -60,3 +66,5 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
.INCLUDE : target.mk
.INCLUDE : _cppunit.mk
+
+.END
diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx
index 89c6ac4927f5..6371ad3b5250 100644
--- a/sal/qa/osl/pipe/osl_Pipe.cxx
+++ b/sal/qa/osl/pipe/osl_Pipe.cxx
@@ -32,7 +32,10 @@
// include files
//------------------------------------------------------------------------
-#include <testshl/simpleheader.hxx>
+#include "cppunit/TestAssert.h"
+#include "cppunit/TestFixture.h"
+#include "cppunit/extensions/HelperMacros.h"
+#include "cppunit/plugin/TestPlugIn.h"
#include <sal/types.h>
#include <rtl/ustring.hxx>
@@ -52,6 +55,7 @@
#ifdef UNX
#include <unistd.h>
#endif
+#include <string.h>
using namespace osl;
using namespace rtl;
@@ -64,8 +68,8 @@ using namespace rtl;
*/
inline void printBool( sal_Bool bOk )
{
- t_print("#printBool# " );
- ( sal_True == bOk ) ? t_print("YES!\n" ): t_print("NO!\n" );
+ printf("#printBool# " );
+ ( sal_True == bOk ) ? printf("YES!\n" ): printf("NO!\n" );
}
/** print a UNI_CODE String.
@@ -74,9 +78,9 @@ inline void printUString( const ::rtl::OUString & str )
{
rtl::OString aString;
- t_print("#printUString_u# " );
+ printf("#printUString_u# " );
aString = ::rtl::OUStringToOString( str, RTL_TEXTENCODING_ASCII_US );
- t_print("%s\n", aString.getStr( ) );
+ printf("%s\n", aString.getStr( ) );
}
/** print last error of pipe system.
@@ -84,43 +88,43 @@ inline void printUString( const ::rtl::OUString & str )
inline void printPipeError( ::osl::Pipe aPipe )
{
oslPipeError nError = aPipe.getError( );
- t_print("#printPipeError# " );
+ printf("#printPipeError# " );
switch ( nError ) {
case osl_Pipe_E_None:
- t_print("Success!\n" );
+ printf("Success!\n" );
break;
case osl_Pipe_E_NotFound:
- t_print("The returned error is: Not found!\n" );
+ printf("The returned error is: Not found!\n" );
break;
case osl_Pipe_E_AlreadyExists:
- t_print("The returned error is: Already exist!\n" );
+ printf("The returned error is: Already exist!\n" );
break;
case osl_Pipe_E_NoProtocol:
- t_print("The returned error is: No protocol!\n" );
+ printf("The returned error is: No protocol!\n" );
break;
case osl_Pipe_E_NetworkReset:
- t_print("The returned error is: Network reset!\n" );
+ printf("The returned error is: Network reset!\n" );
break;
case osl_Pipe_E_ConnectionAbort:
- t_print("The returned error is: Connection aborted!\n" );
+ printf("The returned error is: Connection aborted!\n" );
break;
case osl_Pipe_E_ConnectionReset:
- t_print("The returned error is: Connection reset!\n" );
+ printf("The returned error is: Connection reset!\n" );
break;
case osl_Pipe_E_NoBufferSpace:
- t_print("The returned error is: No buffer space!\n" );
+ printf("The returned error is: No buffer space!\n" );
break;
case osl_Pipe_E_TimedOut:
- t_print("The returned error is: Timeout!\n" );
+ printf("The returned error is: Timeout!\n" );
break;
case osl_Pipe_E_ConnectionRefused:
- t_print("The returned error is: Connection refused!\n" );
+ printf("The returned error is: Connection refused!\n" );
break;
case osl_Pipe_E_invalidError:
- t_print("The returned error is: Invalid error!\n" );
+ printf("The returned error is: Invalid error!\n" );
break;
default:
- t_print("The returned error is: Number %d, Unknown Error\n", nError );
+ printf("The returned error is: Number %d, Unknown Error\n", nError );
break;
}
}
@@ -625,8 +629,8 @@ namespace osl_Pipe
printPipeError( aPipe );
aPipe.clear( );
- CPPUNIT_ASSERT_MESSAGE( "#test comment#: open a non-exist pipe. not passed in (W32)(LINUX)(UNX).",
- osl_Pipe_E_invalidError == nError );
+ CPPUNIT_ASSERT_MESSAGE( "#test comment#: open a non-exist pipe.",
+ nError != osl_Pipe_E_None );
}
void getError_002( )
@@ -638,8 +642,8 @@ namespace osl_Pipe
aPipe.clear( );
aPipe1.clear( );
- CPPUNIT_ASSERT_MESSAGE( "#test comment#: create an already exist pipe.not passed in (W32)(LINUX)(UNX).",
- osl_Pipe_E_invalidError == nError );
+ CPPUNIT_ASSERT_MESSAGE( "#test comment#: create an already exist pipe.",
+ nError != osl_Pipe_E_None );
}
CPPUNIT_TEST_SUITE( getError );
@@ -687,17 +691,17 @@ namespace osl_Pipe
// -----------------------------------------------------------------------------
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::ctors, "osl_Pipe");
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::is, "osl_Pipe");
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::create, "osl_Pipe");
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::clear, "osl_Pipe");
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::assign, "osl_Pipe");
-//CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::isValid, "osl_Pipe");
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::isEqual, "osl_Pipe");
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::close, "osl_Pipe");
- //CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::accept, "osl_Pipe");
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::getError, "osl_Pipe");
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Pipe::getHandle, "osl_Pipe");
+ CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::ctors);
+ CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::is);
+ CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::create);
+ CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::clear);
+ CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::assign);
+//CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::isValid);
+ CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::isEqual);
+ CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::close);
+ //CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::accept);
+ CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::getError);
+ CPPUNIT_TEST_SUITE_REGISTRATION(osl_Pipe::getHandle);
// -----------------------------------------------------------------------------
} // namespace osl_Pipe
@@ -881,7 +885,7 @@ namespace osl_StreamPipe
void thread_sleep( sal_Int32 _nSec )
{
/// print statement in thread process must use fflush() to force display.
- // t_print("wait %d seconds. ", _nSec );
+ // printf("wait %d seconds. ", _nSec );
fflush(stdout);
#ifdef WNT //Windows
@@ -890,7 +894,7 @@ namespace osl_StreamPipe
#if ( defined UNX ) || ( defined OS2 ) //Unix
sleep( _nSec );
#endif
- // t_print("done\n" );
+ // printf("done\n" );
}
// test read/write & send/recv data to pipe
// -----------------------------------------------------------------------------
@@ -909,27 +913,27 @@ namespace osl_StreamPipe
{
sal_Int32 nChars = 0;
- t_print("open pipe\n");
+ printf("open pipe\n");
::osl::StreamPipe aSenderPipe( aTestPipeName, osl_Pipe_OPEN ); // aTestPipeName is a string = "TestPipe"
if ( aSenderPipe.is() == sal_False )
{
- t_print("pipe open failed! \n");
+ printf("pipe open failed! \n");
}
else
{
- t_print("read\n");
+ printf("read\n");
nChars = aSenderPipe.read( buf, m_pTestString1.getLength() + 1 );
if ( nChars < 0 )
{
- t_print("read failed! \n");
+ printf("read failed! \n");
return;
}
- t_print("buffer is %s \n", buf);
- t_print("send\n");
+ printf("buffer is %s \n", buf);
+ printf("send\n");
nChars = aSenderPipe.send( m_pTestString2.getStr(), m_pTestString2.getLength() + 1 );
if ( nChars < 0 )
{
- t_print("client send failed! \n");
+ printf("client send failed! \n");
return;
}
}
@@ -948,7 +952,7 @@ namespace osl_StreamPipe
::osl::StreamPipe aConnectionPipe;
Pipe_DataSource_Thread( )
{
- t_print("create pipe\n");
+ printf("create pipe\n");
aListenPipe.create( aTestPipeName, osl_Pipe_CREATE );
}
~Pipe_DataSource_Thread( )
@@ -961,40 +965,40 @@ namespace osl_StreamPipe
//create pipe.
sal_Int32 nChars;
//::osl::StreamPipe aListenPipe( aTestPipeName, osl_Pipe_CREATE );
- t_print("listen\n");
+ printf("listen\n");
if ( aListenPipe.is() == sal_False )
{
- t_print("pipe create failed! \n");
+ printf("pipe create failed! \n");
}
else
{
//::osl::StreamPipe aConnectionPipe;
//start server and wait for connection.
- t_print("accept\n");
+ printf("accept\n");
if ( osl_Pipe_E_None != aListenPipe.accept( aConnectionPipe ) )
{
- t_print("pipe accept failed!");
+ printf("pipe accept failed!");
return;
}
- t_print("write\n");
+ printf("write\n");
// write to pipe
nChars = aConnectionPipe.write( m_pTestString1.getStr(), m_pTestString1.getLength() + 1 );
if ( nChars < 0)
{
- t_print("server write failed! \n");
+ printf("server write failed! \n");
return;
}
- t_print("recv\n");
+ printf("recv\n");
nChars = aConnectionPipe.recv( buf, 256 );
if ( nChars < 0)
{
- t_print("server receive failed! \n");
+ printf("server receive failed! \n");
return;
}
//thread_sleep( 2 );
- t_print("received message is: %s\n", buf );
+ printf("received message is: %s\n", buf );
//aConnectionPipe.close();
}
}
@@ -1045,16 +1049,11 @@ namespace osl_StreamPipe
}; // class recv
// -----------------------------------------------------------------------------
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_StreamPipe::ctors, "osl_StreamPipe");
-//CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_StreamPipe::assign, "osl_StreamPipe");
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_StreamPipe::recv, "osl_StreamPipe");
+ CPPUNIT_TEST_SUITE_REGISTRATION(osl_StreamPipe::ctors);
+//CPPUNIT_TEST_SUITE_REGISTRATION(osl_StreamPipe::assign);
+ CPPUNIT_TEST_SUITE_REGISTRATION(osl_StreamPipe::recv);
// -----------------------------------------------------------------------------
} // namespace osl_StreamPipe
-
-// -----------------------------------------------------------------------------
-
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sal/qa/osl/pipe/osl_Pipe.xsce b/sal/qa/osl/pipe/osl_Pipe.xsce
deleted file mode 100644
index d96a915d8ab9..000000000000
--- a/sal/qa/osl/pipe/osl_Pipe.xsce
+++ /dev/null
@@ -1,9 +0,0 @@
-#i23307#
-osl_Pipe.getError.getError_001 wntmsci
-osl_Pipe.getError.getError_002 wntmsci
-
-osl_StreamPipe.recv.recv_002 wntmsci unxsols
-# osl_Pipe.ctors.ctors_acquire wntmsci
-
-#i27889#
-osl_Pipe.ctors.ctors_no_acquire wntmsci
diff --git a/sal/qa/osl/pipe/osl_Pipe_Const.h b/sal/qa/osl/pipe/osl_Pipe_Const.h
deleted file mode 100644
index 0b70655eabc0..000000000000
--- a/sal/qa/osl/pipe/osl_Pipe_Const.h
+++ /dev/null
@@ -1 +0,0 @@
-// no longer used
diff --git a/sal/qa/osl/profile/makefile.mk b/sal/qa/osl/profile/makefile.mk
index aa99e25f7c3b..a95db211c2a6 100644
--- a/sal/qa/osl/profile/makefile.mk
+++ b/sal/qa/osl/profile/makefile.mk
@@ -24,6 +24,11 @@
# for a copy of the LGPLv3 License.
#
#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
PRJ=..$/..$/..
PRJNAME=sal
@@ -39,16 +44,19 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
SHL1OBJS= \
$(SLO)$/osl_old_testprofile.obj
SHL1TARGET= osl_old_testprofile
-SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
+SHL1RPATH = NONE
# END ------------------------------------------------------------------
@@ -62,4 +70,4 @@ SLOFILES=\
.INCLUDE : target.mk
.INCLUDE : _cppunit.mk
-
+.END
diff --git a/sal/qa/osl/profile/osl_old_testprofile.cxx b/sal/qa/osl/profile/osl_old_testprofile.cxx
index d85e80203cb3..966a453dc79f 100644
--- a/sal/qa/osl/profile/osl_old_testprofile.cxx
+++ b/sal/qa/osl/profile/osl_old_testprofile.cxx
@@ -37,7 +37,10 @@
#include <stdio.h>
#include <osl/profile.h>
-#include <testshl/simpleheader.hxx>
+#include "cppunit/TestAssert.h"
+#include "cppunit/TestFixture.h"
+#include "cppunit/extensions/HelperMacros.h"
+#include "cppunit/plugin/TestPlugIn.h"
//==================================================================================================
// -----------------------------------------------------------------------------
@@ -64,7 +67,8 @@ void oldtests::test_profile(void)
// successful write
- if (hProfile = osl_openProfile( ustrProfileName, 0 ))
+ hProfile = osl_openProfile( ustrProfileName, 0 );
+ if (hProfile != 0)
{
if (! osl_writeProfileBool( hProfile, "testsection", "testbool", 1 ))
printf( "### cannot write into init file!\n" );
@@ -73,7 +77,8 @@ void oldtests::test_profile(void)
}
// unsuccessful write
- if (hProfile = osl_openProfile( ustrProfileName2, 0 ))
+ hProfile = osl_openProfile( ustrProfileName2, 0 );
+ if (hProfile != 0)
{
if (osl_writeProfileBool( hProfile, "testsection", "testbool", 1 ))
printf( "### unexpected success writing into test2.ini!\n" );
@@ -88,7 +93,7 @@ void oldtests::test_profile(void)
} // namespace osl_Profile
// -----------------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_Profile::oldtests, "osl_Profile" );
+CPPUNIT_TEST_SUITE_REGISTRATION( osl_Profile::oldtests );
// -----------------------------------------------------------------------------
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sal/qa/osl/semaphore/makefile.mk b/sal/qa/osl/semaphore/makefile.mk
deleted file mode 100644
index 3cab9d650477..000000000000
--- a/sal/qa/osl/semaphore/makefile.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sal
-TARGET=qa_osl_semaphore
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGS+= $(LFS_CFLAGS)
-CXXFLAGS+= $(LFS_CFLAGS)
-
-# BEGIN ----------------------------------------------------------------
-# auto generated Target:Semaphore by codegen.pl
-SHL1OBJS= \
- $(SLO)$/osl_Semaphore.obj
-
-SHL1TARGET= osl_Semaphore
-SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
-
-SHL1IMPLIB= i$(SHL1TARGET)
-
-DEF1NAME =$(SHL1TARGET)
-SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
-
-# auto generated Target:Semaphore
-# END ------------------------------------------------------------------
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-.INCLUDE : _cppunit.mk
diff --git a/sal/qa/osl/semaphore/osl_Semaphore.cxx b/sal/qa/osl/semaphore/osl_Semaphore.cxx
deleted file mode 100644
index 4a02e284a89b..000000000000
--- a/sal/qa/osl/semaphore/osl_Semaphore.cxx
+++ /dev/null
@@ -1,525 +0,0 @@
- /*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sal.hxx"
-
-//------------------------------------------------------------------------
-// include files
-//------------------------------------------------------------------------
-#include <osl_Semaphore_Const.h>
-
-using namespace osl;
-using namespace rtl;
-
-
-//------------------------------------------------------------------------
-// helper functions and classes
-//------------------------------------------------------------------------
-
-/** print Boolean value.
-*/
-inline void printBool( sal_Bool bOk )
-{
- t_print("#printBool# " );
- ( sal_True == bOk ) ? t_print("YES!\n" ): t_print("NO!\n" );
-}
-
-/** print a UNI_CODE String.
-*/
-inline void printUString( const ::rtl::OUString & str )
-{
- rtl::OString aString;
-
- t_print("#printUString_u# " );
- aString = ::rtl::OUStringToOString( str, RTL_TEXTENCODING_ASCII_US );
- t_print("%s\n", aString.getStr( ) );
-}
-
-/** wait _nSec seconds.
-*/
-void thread_sleep( sal_Int32 _nSec )
-{
- /// print statement in thread process must use fflush() to force display.
- // t_print("wait %d seconds. ", _nSec );
- // fflush( stdout );
-
-#ifdef WNT //Windows
- Sleep( _nSec * 1000 );
-#endif
-#if ( defined UNX ) || ( defined OS2 ) //Unix
- sleep( _nSec );
-#endif
-}
-
- void thread_sleep_tenth_sec(sal_Int32 _nTenthSec)
- {
-#ifdef WNT //Windows
- Sleep(_nTenthSec * 100 );
-#endif
-#if ( defined UNX ) || ( defined OS2 ) //Unix
- TimeValue nTV;
- nTV.Seconds = static_cast<sal_uInt32>( _nTenthSec/10 );
- nTV.Nanosec = ( (_nTenthSec%10 ) * 100000000 );
- osl_waitThread(&nTV);
-#endif
-}
-
-/** thread for testing Semaphore acquire.
- */
-class HoldThread : public Thread
-{
-public:
- //get the Semaphores to operate
- HoldThread( ::osl::Semaphore& Sem ): MySem( Sem ) { }
-
- ~HoldThread( )
- {
- CPPUNIT_ASSERT_MESSAGE( "#HoldThread does not shutdown properly.\n", sal_False == this -> isRunning( ) );
- }
-protected:
- ::osl::Semaphore& MySem;
-
- void SAL_CALL run()
- {
- // block here if it tries to decrease below zero.
- MySem.acquire( );
- t_print("Semaphore acquired. \n" );
- MySem.release( );
- }
-};
-
-/** thread for testing Semaphore release and tryToAcquire.
- */
-class WaitThread : public Thread
-{
-public:
- //get the Semaphore pointer to operate
- WaitThread( ::osl::Semaphore& Sem ): MySem( Sem ) { }
-
- ~WaitThread( )
- {
- CPPUNIT_ASSERT_MESSAGE( "WaitThread does not shutdown properly.\n", sal_False == this -> isRunning( ) );
- }
-protected:
- Semaphore& MySem;
-
- void SAL_CALL run( )
- {
- // block here if the semaphore has been acquired
- MySem.acquire( );
- thread_sleep_tenth_sec( 2 );
- MySem.release( );
- }
-};
-
-/** thread for producer-consumer model.
- */
-#define BSIZE 50
-class SemBuffer
-{
-public:
- sal_Int32 Buf[BSIZE];
- ::osl::Semaphore& aSemOccupied;
- ::osl::Semaphore& aSemEmpty;
- ::osl::Mutex& aMutex;
-
- SemBuffer( ::osl::Semaphore& Sem, ::osl::Semaphore& Sem1, ::osl::Mutex& Mut )
- :aSemOccupied( Sem ), aSemEmpty( Sem1 ), aMutex( Mut )
- {
- for ( sal_Int8 iCount=0; iCount < BSIZE; iCount++ )
- Buf[iCount] = 0;
- }
-};
-
-class WriterThread : public Thread
-{
-public:
- //get the Semaphores to operate
- WriterThread( SemBuffer& aSemBuffer ): MySemBuffer( aSemBuffer ){ }
-
- ~WriterThread( )
- {
- CPPUNIT_ASSERT_MESSAGE( "WriterThread does not shutdown properly.\n", sal_False == this -> isRunning( ) );
- }
-protected:
- SemBuffer& MySemBuffer;
-
- void SAL_CALL run( )
- {
- for ( sal_Int32 iCount = 0; iCount < BSIZE; iCount++ )
- {
- MySemBuffer.aSemEmpty.acquire( ) ;
- MySemBuffer.aMutex.acquire( ) ;
- MySemBuffer.Buf[iCount] = iCount;
- MySemBuffer.aMutex.release( ) ;
- MySemBuffer.aSemOccupied.release( ) ;
- }
- }
-};
-
-class ReaderThread : public Thread
-{
-public:
- //get the Semaphores to operate
- ReaderThread( SemBuffer& aSemBuffer ): MySemBuffer( aSemBuffer ){ }
-
- ~ReaderThread( )
- {
- CPPUNIT_ASSERT_MESSAGE( "ReaderThread does not shutdown properly.\n", sal_False == this -> isRunning( ) );
- }
-
-protected:
- SemBuffer& MySemBuffer;
-
- void SAL_CALL run( )
- {
- for ( sal_Int32 iCount = 0; iCount < BSIZE; iCount++ )
- {
- MySemBuffer.aSemOccupied.acquire( ) ;
- MySemBuffer.aMutex.acquire( ) ;
- MySemBuffer.Buf[iCount] *= MySemBuffer.Buf[iCount];
- MySemBuffer.aMutex.release( ) ;
- MySemBuffer.aSemEmpty.release( ) ;
- }
- }
-};
-
-
-
-//------------------------------------------------------------------------
-// test code start here
-//------------------------------------------------------------------------
-
-namespace osl_Semaphore
-{
-
- /** testing the method:
- Semaphore(sal_uInt32 initialCount);
- */
- class ctors : public CppUnit::TestFixture
- {
- public:
- sal_Bool bRes, bRes1;
-
- void ctors_001( )
- {
- ::osl::Semaphore aSem(sal_uInt32(0));
- bRes = aSem.tryToAcquire( );
-
- CPPUNIT_ASSERT_MESSAGE( "#test comment#: create semaphore with initialCount = 0. the first acquire will block.",
- sal_False == bRes );
- }
-
- void ctors_002( )
- {
- ::osl::Semaphore aSem(sal_uInt32(1));
- bRes = aSem.tryToAcquire( );
- if ( sal_True == bRes )
- aSem.release( );
-
- CPPUNIT_ASSERT_MESSAGE( "#test comment#: create semaphore with initialCount = 1. the first acquire will not block.",
- sal_True == bRes );
- }
-
- void ctors_003( )
- {
- ::osl::Semaphore aSem(sal_uInt32(1));
- bRes = aSem.tryToAcquire( );
- bRes1 = aSem.tryToAcquire( );
-
- CPPUNIT_ASSERT_MESSAGE( "#test comment#: create semaphore with initialCount = 1. acquire twice will cause block.",
- sal_True == bRes && sal_False == bRes1);
- }
-
- void ctors_004( )
- {
- oslSemaphore hSem = new ::osl::Semaphore(sal_uInt32(1));
-
- CPPUNIT_ASSERT_MESSAGE( "#test comment#: test return value of the constructor, it should not be NULL.",
- NULL != hSem );
- }
-
- void ctors_005( )
- {
- ::osl::Semaphore aSemaphore(sal_uInt32(2));
- bRes = aSemaphore.tryToAcquire( )&&
- aSemaphore.tryToAcquire( )&&
- !aSemaphore.tryToAcquire( );
-
- CPPUNIT_ASSERT_MESSAGE( "#test comment#: create semaphore with initialCount = 2. guess what behaviour will the semaphore act like.",
- sal_True == bRes );
- }
-
- CPPUNIT_TEST_SUITE( ctors );
- CPPUNIT_TEST( ctors_001 );
- CPPUNIT_TEST( ctors_002 );
- CPPUNIT_TEST( ctors_003 );
- CPPUNIT_TEST( ctors_004 );
- CPPUNIT_TEST( ctors_005 );
- CPPUNIT_TEST_SUITE_END( );
- }; // class ctors
-
-
- /** testing the method:
- sal_Bool acquire();
- */
- class acquire : public CppUnit::TestFixture
- {
- public:
- sal_Bool bRes, bRes1, bRes2;
-
- /** tester comment:
- acquire semaphore in main thread, and then call acquire again in myThread,
- the child thread should block, wait 2 secs, it still block. Then release
- semaphore in main thread, the child thread could return from acquire, and
- go to exec next statement, so could terminate quickly.
- */
-
- void acquire_001( )
- {
- // launch the child thread
- ::osl::Semaphore aSemaphore(1);
- bRes = aSemaphore.acquire( );
- HoldThread myThread( aSemaphore );
- myThread.create( );
-
- // if acquire in myThread does not work, 2 secs is long enough,
- // myThread should terminate now, and bRes1 should be sal_False
- thread_sleep_tenth_sec( 2 );
- bRes1 = myThread.isRunning( );
-
- // after release semaphore, myThread stops blocking and will terminate immediately
- aSemaphore.release( );
- thread_sleep_tenth_sec( 1 );
- bRes2 = myThread.isRunning( );
- myThread.join( );
-
- CPPUNIT_ASSERT_MESSAGE( "#test comment#: test acquire of Semaphore.",
- bRes == sal_True && bRes1 == sal_True && bRes2 == sal_False );
- }
-
- /** tester comment:
- launch 3 thread for testing acquirement inter-process.
- */
-
- void acquire_002( )
- {
- // launch three child threads
- ::osl::Semaphore aSemaphore(1);
- bRes = aSemaphore.acquire( );
- HoldThread myThread1( aSemaphore );
- myThread1.create( );
- HoldThread myThread2( aSemaphore );
- myThread2.create( );
- HoldThread myThread3( aSemaphore );
- myThread3.create( );
-
- // if acquire in myThread does not work, 2 secs is long enough,
- thread_sleep_tenth_sec( 2 );
- bRes1 = myThread1.isRunning( ) && myThread2.isRunning( ) && myThread3.isRunning( );
-
- // after release semaphore, myThread stops blocking and will terminate immediately
- aSemaphore.release( );
- thread_sleep_tenth_sec( 1 );
- bRes2 = myThread1.isRunning( ) || myThread2.isRunning( ) || myThread3.isRunning( );
- myThread1.join( );
- myThread2.join( );
- myThread3.join( );
-
- CPPUNIT_ASSERT_MESSAGE( "#test comment#: test acquire of Semaphore in multithreaded environment.",
- bRes == sal_True && bRes1 == sal_True && bRes2 == sal_False );
- }
-
-
-
- /** tester comment:
- launch 3 thread for testing acquirement inter-process. in this test,
- we use two threads as producer and consumer, operate together on an
- array which is initialized to 0 for every item. producer takes action
- as follow:
- p(A), p(M), Buf[i]=i, v(M), v(B).
- consumer's action is like:
- p(B), p(M), Buf[i]=Buf[i]*Buf[i], v(M), v(A).
- consumer must operate on the array after producer does sequetially,
- otherwise, the array will contain items remain zero after all threads
- terminate. array will be filled with index^2 in the end.
- */
-
- void acquire_003( )
- {
- // initialization.
- ::osl::Semaphore aSemOccupied( sal_uInt32(0) );
- ::osl::Semaphore aSemEmpty( BSIZE );
- ::osl::Mutex aMutex;
-
- // launch two threads.
- SemBuffer aBuffer( aSemOccupied, aSemEmpty, aMutex );
- WriterThread myThread1( aBuffer );
- ReaderThread myThread2( aBuffer );
- myThread1.create( );
- myThread2.create( );
-
- myThread1.join( );
- myThread2.join( );
-
- bRes = sal_True;
- for ( sal_Int32 iCount = 0; iCount < BSIZE; iCount++ )
- bRes = bRes && ( aBuffer.Buf[iCount] == iCount*iCount );
-
- CPPUNIT_ASSERT_MESSAGE( "#test comment#: test acquire of Semaphore using Producer-Consumer model.",
- sal_True == bRes );
- }
-
- CPPUNIT_TEST_SUITE( acquire );
- CPPUNIT_TEST( acquire_001 );
- CPPUNIT_TEST( acquire_002 );
- CPPUNIT_TEST( acquire_003 );
- CPPUNIT_TEST_SUITE_END( );
- }; // class acquire
-
-
- /** testing the method:
- sal_Bool tryToAcquire();
- */
- class tryToAcquire : public CppUnit::TestFixture
- {
- public:
- sal_Bool bRes, bRes1, bRes2;
- /** tester comment:
- First let child thread acquire the semaphore, and wait 2 secs, during the 2 secs,
- in main thread, tryToAcquire semaphore should return False, then after the
- child thread terminated, tryToAcquire should return True
- */
- void tryToAcquire_001()
- {
- ::osl::Semaphore aSemaphore(1);
- WaitThread myThread( aSemaphore );
- myThread.create();
-
- // ensure the child thread acquire the semaphore
- thread_sleep_tenth_sec(1);
- bRes1 = aSemaphore.tryToAcquire();
-
- if (bRes1 == sal_True)
- aSemaphore.release();
- // wait the child thread terminate
- myThread.join();
-
- bRes2 = aSemaphore.tryToAcquire();
- if (bRes2 == sal_True)
- aSemaphore.release();
-
- CPPUNIT_ASSERT_MESSAGE("#test comment#: Try to acquire Semaphore",
- bRes1 == sal_False && bRes2 == sal_True);
- }
-
- void tryToAcquire_002()
- {
- ::osl::Semaphore aSem(1);
- bRes = aSem.tryToAcquire( );
- bRes1 = aSem.tryToAcquire( );
-
-
- CPPUNIT_ASSERT_MESSAGE("#test comment#: Try to acquire Semaphore twice should block.",
- sal_True == bRes && sal_False == bRes1);
- }
-
- CPPUNIT_TEST_SUITE( tryToAcquire );
- CPPUNIT_TEST( tryToAcquire_001 );
- CPPUNIT_TEST( tryToAcquire_002 );
- CPPUNIT_TEST_SUITE_END( );
- }; // class tryToAcquire
-
-
- /** testing the method:
- sal_Bool release();
- */
- class release : public CppUnit::TestFixture
- {
- public:
- sal_Bool bRes, bRes1, bRes2, bRunning;
- sal_Int32 nCount;
- /** acquire/release are not used in pairs: after child thread acquired semaphore,
- the main thread release it, then any thread could acquire it.
- */
- void release_001()
- {
- Semaphore aSemaphore(1);
- WaitThread myThread( aSemaphore );
- myThread.create( );
-
- // ensure the child thread acquire the mutex
- thread_sleep_tenth_sec( 1 );
-
- bRunning = myThread.isRunning( );
- bRes1 = aSemaphore.tryToAcquire( );
- // wait the child thread terminate
- myThread.join( );
-
- bRes2 = aSemaphore.tryToAcquire( );
- if ( bRes2 == sal_True )
- aSemaphore.release( );
-
- CPPUNIT_ASSERT_MESSAGE( "release Semaphore: try to aquire before and after the semaphore has been released",
- bRes1 == sal_False && bRes2 == sal_True && bRunning == sal_True );
-
- }
-
- void release_002()
- {
- Semaphore aSemaphore(sal_uInt32(0));
- bRes1 = sal_True;
- for ( nCount = 0; nCount < 10; nCount++, aSemaphore.release( ) ) { }
- for ( nCount = 0; nCount < 10; nCount++, bRes1 = bRes1 && aSemaphore.tryToAcquire( ) ) { }
- bRes = aSemaphore.tryToAcquire( );
-
- CPPUNIT_ASSERT_MESSAGE( "release Semaphore: release ten times and acquire eleven times.",
- sal_False == bRes && sal_True == bRes1);
- }
-
- CPPUNIT_TEST_SUITE( release );
- CPPUNIT_TEST( release_001 );
- CPPUNIT_TEST( release_002 );
- CPPUNIT_TEST_SUITE_END( );
- }; // class release
-
-// -----------------------------------------------------------------------------
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Semaphore::ctors, "osl_Semaphore");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Semaphore::acquire, "osl_Semaphore");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Semaphore::tryToAcquire, "osl_Semaphore");
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Semaphore::release, "osl_Semaphore");
-// -----------------------------------------------------------------------------
-
-} // namespace osl_Semaphore
-
-
-// -----------------------------------------------------------------------------
-
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-NOADDITIONAL;
diff --git a/sal/qa/osl/semaphore/osl_Semaphore_Const.h b/sal/qa/osl/semaphore/osl_Semaphore_Const.h
deleted file mode 100644
index 457d27e42865..000000000000
--- a/sal/qa/osl/semaphore/osl_Semaphore_Const.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-//------------------------------------------------------------------------
-//------------------------------------------------------------------------
-
-#ifndef _OSL_SEMAPHORE_CONST_H_
-#define _OSL_SEMAPHORE_CONST_H_
-
-//------------------------------------------------------------------------
-//------------------------------------------------------------------------
-
-#include <sal/types.h>
-#include <rtl/ustring.hxx>
-
-#ifndef _OSL_THREAD_HXX_
-#include <osl/thread.hxx>
-#endif
-#include <osl/mutex.hxx>
-#include <osl/pipe.hxx>
-
-#ifndef _OSL_SEMAPHOR_HXX_
-#include <osl/semaphor.hxx>
-#endif
-#include <osl/time.h>
-
-#include <testshl/simpleheader.hxx>
-
-#ifdef UNX
-#include <unistd.h>
-#endif
-
-//------------------------------------------------------------------------
-// most return value -1 denote a fail of operation.
-//------------------------------------------------------------------------
-#define OSL_PIPE_FAIL -1
-
-#define OSLTEST_DECLARE_USTRING( str_name, str_value ) \
- ::rtl::OUString a##str_name = rtl::OUString::createFromAscii( str_value )
-
-//------------------------------------------------------------------------
-// semaphre names
-//------------------------------------------------------------------------
-OSLTEST_DECLARE_USTRING( TestSem, "testsem" );
-
-const char pTestString[17] = "Sun Microsystems";
-
-
-#endif /* _OSL_SEMAPHORE_CONST_H_ */
diff --git a/sal/qa/rtl/alloc/makefile.mk b/sal/qa/rtl/alloc/makefile.mk
index ea22fbc2720a..37ae3718b40d 100755
--- a/sal/qa/rtl/alloc/makefile.mk
+++ b/sal/qa/rtl/alloc/makefile.mk
@@ -40,6 +40,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:jobfile by codegen.pl
SHL1OBJS= \
diff --git a/sal/qa/rtl/bootstrap/makefile.mk b/sal/qa/rtl/bootstrap/makefile.mk
index e17f3c410e94..d32f9db35383 100644
--- a/sal/qa/rtl/bootstrap/makefile.mk
+++ b/sal/qa/rtl/bootstrap/makefile.mk
@@ -50,6 +50,8 @@ MY_SCRIPTCAT=tr -d "\015" <
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
diff --git a/sal/qa/rtl/cipher/makefile.mk b/sal/qa/rtl/cipher/makefile.mk
index 73bf673f6c3d..b89e392d71d6 100644
--- a/sal/qa/rtl/cipher/makefile.mk
+++ b/sal/qa/rtl/cipher/makefile.mk
@@ -40,6 +40,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
diff --git a/sal/qa/rtl/crc32/makefile.mk b/sal/qa/rtl/crc32/makefile.mk
index c936b51a32d3..6bd3bd89d5a6 100755
--- a/sal/qa/rtl/crc32/makefile.mk
+++ b/sal/qa/rtl/crc32/makefile.mk
@@ -40,6 +40,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:jobfile by codegen.pl
SHL1OBJS= \
diff --git a/sal/qa/rtl/digest/makefile.mk b/sal/qa/rtl/digest/makefile.mk
index fceb9eac8de8..415183b7e9a0 100644
--- a/sal/qa/rtl/digest/makefile.mk
+++ b/sal/qa/rtl/digest/makefile.mk
@@ -41,6 +41,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
#----------------------------------- OStringBuffer -----------------------------------
SHL1OBJS= \
diff --git a/sal/qa/rtl/doublelock/makefile.mk b/sal/qa/rtl/doublelock/makefile.mk
index a914dfa86f22..b13ccf420c06 100644
--- a/sal/qa/rtl/doublelock/makefile.mk
+++ b/sal/qa/rtl/doublelock/makefile.mk
@@ -40,6 +40,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:testjob by codegen.pl
diff --git a/sal/qa/rtl/locale/makefile.mk b/sal/qa/rtl/locale/makefile.mk
index 490ee7b22364..329769b5d3ec 100644
--- a/sal/qa/rtl/locale/makefile.mk
+++ b/sal/qa/rtl/locale/makefile.mk
@@ -40,6 +40,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:locale by codegen.pl
SHL1OBJS= \
diff --git a/sal/qa/rtl/logfile/makefile.mk b/sal/qa/rtl/logfile/makefile.mk
index 92e3d30dd7a5..9b52e0a45b37 100644
--- a/sal/qa/rtl/logfile/makefile.mk
+++ b/sal/qa/rtl/logfile/makefile.mk
@@ -39,6 +39,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# --- BEGIN --------------------------------------------------------
SHL1OBJS= \
$(SLO)$/rtl_logfile.obj
diff --git a/sal/qa/rtl/math/makefile.mk b/sal/qa/rtl/math/makefile.mk
index a5cd21da67ce..3b35e52ab1f4 100644
--- a/sal/qa/rtl/math/makefile.mk
+++ b/sal/qa/rtl/math/makefile.mk
@@ -41,6 +41,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
#----------------------------------- OStringBuffer -----------------------------------
SHL1OBJS= \
diff --git a/sal/qa/rtl/ostring/makefile.mk b/sal/qa/rtl/ostring/makefile.mk
index bfb6c74c3482..06469b38a407 100644
--- a/sal/qa/rtl/ostring/makefile.mk
+++ b/sal/qa/rtl/ostring/makefile.mk
@@ -40,6 +40,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
diff --git a/sal/qa/rtl/oustring/makefile.mk b/sal/qa/rtl/oustring/makefile.mk
index e65611410003..6f15637651c6 100644
--- a/sal/qa/rtl/oustring/makefile.mk
+++ b/sal/qa/rtl/oustring/makefile.mk
@@ -40,6 +40,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
diff --git a/sal/qa/rtl/oustringbuffer/makefile.mk b/sal/qa/rtl/oustringbuffer/makefile.mk
index 7ba01bcebd72..544f7b7df170 100644
--- a/sal/qa/rtl/oustringbuffer/makefile.mk
+++ b/sal/qa/rtl/oustringbuffer/makefile.mk
@@ -40,6 +40,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
diff --git a/sal/qa/rtl/process/makefile.mk b/sal/qa/rtl/process/makefile.mk
index ef79fc46ca3a..5df9dc01504e 100644
--- a/sal/qa/rtl/process/makefile.mk
+++ b/sal/qa/rtl/process/makefile.mk
@@ -40,6 +40,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
diff --git a/sal/qa/rtl/random/makefile.mk b/sal/qa/rtl/random/makefile.mk
index b97599240a37..cd57ec9bcc13 100644
--- a/sal/qa/rtl/random/makefile.mk
+++ b/sal/qa/rtl/random/makefile.mk
@@ -40,6 +40,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:job by codegen.pl
SHL1OBJS= \
diff --git a/sal/qa/rtl/strings/makefile.mk b/sal/qa/rtl/strings/makefile.mk
index e1a5dd3af99a..3c1b9219642f 100644
--- a/sal/qa/rtl/strings/makefile.mk
+++ b/sal/qa/rtl/strings/makefile.mk
@@ -37,6 +37,8 @@ ENABLE_EXCEPTIONS := TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
SHL1TARGET := $(TARGET)
SHL1OBJS := \
$(SLO)$/test_oustringbuffer_utf32.obj \
diff --git a/sal/qa/rtl/textenc/makefile.mk b/sal/qa/rtl/textenc/makefile.mk
index 1126c0facaba..597309d9bfe6 100644
--- a/sal/qa/rtl/textenc/makefile.mk
+++ b/sal/qa/rtl/textenc/makefile.mk
@@ -39,6 +39,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# --- BEGIN --------------------------------------------------------
SHL1OBJS= \
$(SLO)$/rtl_textcvt.obj
@@ -47,11 +49,7 @@ SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
-.IF "$(COMNAME)" == "gcc3"
-SHL1VERSIONMAP = gcc3_export.map
-.ELSE
SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
-.ENDIF
# END --------------------------------------------------------------
@@ -63,11 +61,7 @@ SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL2IMPLIB= i$(SHL2TARGET)
DEF2NAME =$(SHL2TARGET)
-.IF "$(COMNAME)" == "gcc3"
-SHL2VERSIONMAP = gcc3_export.map
-.ELSE
SHL2VERSIONMAP = $(PRJ)$/qa$/export.map
-.ENDIF
# END --------------------------------------------------------------
diff --git a/sal/qa/rtl/uri/makefile.mk b/sal/qa/rtl/uri/makefile.mk
index 1858f586401a..d4a8814cc649 100644
--- a/sal/qa/rtl/uri/makefile.mk
+++ b/sal/qa/rtl/uri/makefile.mk
@@ -39,6 +39,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# --- BEGIN --------------------------------------------------------
SHL1OBJS= \
$(SLO)$/rtl_Uri.obj
diff --git a/sal/qa/rtl/uuid/makefile.mk b/sal/qa/rtl/uuid/makefile.mk
index 93890f0da819..40e583f8b019 100644
--- a/sal/qa/rtl/uuid/makefile.mk
+++ b/sal/qa/rtl/uuid/makefile.mk
@@ -40,6 +40,8 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
+
# BEGIN ----------------------------------------------------------------
# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
diff --git a/sal/util/makefile.mk b/sal/util/makefile.mk
index 6de6cc25c7ce..82ebbc811c8d 100644
--- a/sal/util/makefile.mk
+++ b/sal/util/makefile.mk
@@ -230,8 +230,6 @@ SHL1STDLIBS+=-lgcc
$(SHL1TARGETN) : $(OUT)$/inc$/udkversion.h
.ENDIF # "$(SHL1TARGETN)" != ""
-.IF "$(GUI)"=="UNX" || "$(USE_SHELL)"!="4nt"
-
$(OUT)$/inc$/udkversion.h:
echo '#ifndef _SAL_UDKVERSION_H_' > $@
echo '#define _SAL_UDKVERSION_H_' >> $@
@@ -241,17 +239,3 @@ $(OUT)$/inc$/udkversion.h:
echo '#define SAL_UDK_MICRO "$(UDK_MICRO)"' >> $@
echo '' >> $@
echo '#endif' >> $@
-
-.ELSE
-
-$(OUT)$/inc$/udkversion.h:
- echo #ifndef _SAL_UDKVERSION_H_ > $@
- echo #define _SAL_UDKVERSION_H_ >> $@
- echo. >> $@
- echo #define SAL_UDK_MAJOR "$(UDK_MAJOR)" >> $@
- echo #define SAL_UDK_MINOR "$(UDK_MINOR)" >> $@
- echo #define SAL_UDK_MICRO "$(UDK_MICRO)" >> $@
- echo. >> $@
- echo #endif >> $@
-
-.ENDIF