diff options
144 files changed, 676 insertions, 1748 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx index f38878da0..ba3d57d46 100644 --- a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx @@ -100,8 +100,6 @@ enum x86_64_reg_class #define MAX_CLASSES 4 -#define ALIGN(v, a) (((((size_t) (v))-1) | ((a)-1))+1) - /* x86-64 register passing implementation. See x86-64 ABI for details. Goal of this code is to classify each 8bytes of incoming argument by the register class and assign registers accordingly. */ @@ -153,11 +151,8 @@ merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2) See the x86-64 PS ABI for details. */ static int -classify_argument( typelib_TypeDescriptionReference *pTypeRef, enum x86_64_reg_class classes[], int &rByteOffset ) +classify_argument( typelib_TypeDescriptionReference *pTypeRef, enum x86_64_reg_class classes[], int byteOffset ) { - /* First, align to the right place. */ - rByteOffset = ALIGN( rByteOffset, pTypeRef->pType->nAlignment ); - switch ( pTypeRef->eTypeClass ) { case typelib_TypeClass_VOID: @@ -173,13 +168,13 @@ classify_argument( typelib_TypeDescriptionReference *pTypeRef, enum x86_64_reg_c case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: case typelib_TypeClass_ENUM: - if ( ( rByteOffset % 8 + pTypeRef->pType->nSize ) <= 4 ) + if ( ( byteOffset % 8 + pTypeRef->pType->nSize ) <= 4 ) classes[0] = X86_64_INTEGERSI_CLASS; else classes[0] = X86_64_INTEGER_CLASS; return 1; case typelib_TypeClass_FLOAT: - if ( ( rByteOffset % 8 ) == 0 ) + if ( ( byteOffset % 8 ) == 0 ) classes[0] = X86_64_SSESF_CLASS; else classes[0] = X86_64_SSE_CLASS; @@ -226,9 +221,9 @@ classify_argument( typelib_TypeDescriptionReference *pTypeRef, enum x86_64_reg_c for ( sal_Int32 nMember = 0; nMember < pStruct->nMembers; ++nMember ) { typelib_TypeDescriptionReference *pTypeInStruct = pStruct->ppTypeRefs[ nMember ]; - rByteOffset = pStruct->pMemberOffsets[ nMember ]; + int offset = byteOffset + pStruct->pMemberOffsets[ nMember ]; - int num = classify_argument( pTypeInStruct, subclasses, rByteOffset ); + int num = classify_argument( pTypeInStruct, subclasses, offset ); if ( num == 0 ) { @@ -238,7 +233,7 @@ classify_argument( typelib_TypeDescriptionReference *pTypeRef, enum x86_64_reg_c for ( int i = 0; i < num; i++ ) { - int pos = rByteOffset / 8; + int pos = offset / 8; classes[i + pos] = merge_classes( subclasses[i], classes[i + pos] ); } } @@ -281,10 +276,9 @@ classify_argument( typelib_TypeDescriptionReference *pTypeRef, enum x86_64_reg_c bool x86_64::examine_argument( typelib_TypeDescriptionReference *pTypeRef, bool bInReturn, int &nUsedGPR, int &nUsedSSE ) { enum x86_64_reg_class classes[MAX_CLASSES]; - int offset = 0; int n; - n = classify_argument( pTypeRef, classes, offset ); + n = classify_argument( pTypeRef, classes, 0 ); if ( n == 0 ) return false; @@ -330,10 +324,9 @@ bool x86_64::return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef void x86_64::fill_struct( typelib_TypeDescriptionReference *pTypeRef, const sal_uInt64 *pGPR, const double *pSSE, void *pStruct ) { enum x86_64_reg_class classes[MAX_CLASSES]; - int offset = 0; int n; - n = classify_argument( pTypeRef, classes, offset ); + n = classify_argument( pTypeRef, classes, 0 ); sal_uInt64 *pStructAlign = reinterpret_cast<sal_uInt64 *>( pStruct ); for ( n--; n >= 0; n-- ) @@ -441,10 +434,10 @@ ffi_prep_args (stackLayout *stack, extended_cif *ecif) /* All easy cases are eliminated. Now fire the big guns. */ enum x86_64_reg_class classes[MAX_CLASSES]; - int offset = 0, j, num; + int j, num; void *a; - num = classify_argument (*p_arg, classes, &offset); + num = classify_argument (*p_arg, classes, 0); for (j=0, a=*p_argv; j<num; j++, a+=8) { switch (classes[j]) @@ -571,7 +564,7 @@ ffi_fill_return_value (return_value *rv, extended_cif *ecif) ; } - num = classify_argument (ecif->cif->rtype, classes, &i); + num = classify_argument (ecif->cif->rtype, classes, 0); if (num == 0) /* Return in memory. */ diff --git a/bridges/test/java_uno/acquire/makefile.mk b/bridges/test/java_uno/acquire/makefile.mk index 96ee48f62..def12dd53 100644 --- a/bridges/test/java_uno/acquire/makefile.mk +++ b/bridges/test/java_uno/acquire/makefile.mk @@ -43,7 +43,7 @@ SLOFILES = $(SLO)$/testacquire.obj SHL1TARGET = testacquire.uno SHL1OBJS = $(SLOFILES) SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) -SHL1VERSIONMAP = testacquire.map +SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1IMPLIB = itestacquire JAVAFILES = TestAcquire.java @@ -52,10 +52,10 @@ JARFILES = OOoRunner.jar juh.jar jurt.jar ridl.jar .INCLUDE: target.mk ALLTAR: \ - $(BIN)$/testacquire-java-client$(SCRIPTEXT) \ - $(BIN)$/testacquire-java-server$(SCRIPTEXT) \ - $(BIN)$/testacquire-native-client$(SCRIPTEXT) \ - $(BIN)$/testacquire-native-server$(SCRIPTEXT) + $(BIN)$/testacquire-java-client \ + $(BIN)$/testacquire-java-server \ + $(BIN)$/testacquire-native-client \ + $(BIN)$/testacquire-native-server .IF "$(GUI)" == "WNT" GIVE_EXEC_RIGHTS = @echo @@ -86,7 +86,7 @@ $(SLOFILES) $(JAVACLASSFILES): $(BIN)$/$(TARGET).rdb TEST_JAVAUNO_ACQUIRE_UNO_URL := \ \"'uno:socket,host=127.0.0.1,port=2002;urp;test'\" -$(BIN)$/testacquire-java-client$(SCRIPTEXT): +$(BIN)$/testacquire-java-client: echo java -classpath \ ..$/class$/test$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)\ ..$/class$/java_uno.jar$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \ @@ -94,7 +94,7 @@ $(BIN)$/testacquire-java-client$(SCRIPTEXT): $(TEST_JAVAUNO_ACQUIRE_UNO_URL) > $@ $(GIVE_EXEC_RIGHTS) $@ -$(BIN)$/testacquire-java-server$(SCRIPTEXT): +$(BIN)$/testacquire-java-server: echo java -classpath \ ..$/class$/test$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)\ ..$/class$/java_uno.jar$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \ @@ -102,14 +102,14 @@ $(BIN)$/testacquire-java-server$(SCRIPTEXT): $(TEST_JAVAUNO_ACQUIRE_UNO_URL) > $@ $(GIVE_EXEC_RIGHTS) $@ -$(BIN)$/testacquire-native-client$(SCRIPTEXT): +$(BIN)$/testacquire-native-client: echo '$(AUGMENT_LIBRARY_PATH)' uno \ -c com.sun.star.test.bridges.testacquire.impl \ -l ../lib/$(SHL1TARGETN:f) -ro $(TARGET).rdb -- \ $(TEST_JAVAUNO_ACQUIRE_UNO_URL) > $@ $(GIVE_EXEC_RIGHTS) $@ -$(BIN)$/testacquire-native-server$(SCRIPTEXT): +$(BIN)$/testacquire-native-server: echo '$(AUGMENT_LIBRARY_PATH)' uno \ -c com.sun.star.test.bridges.testacquire.impl \ -l ../lib/$(SHL1TARGETN:f) -ro $(TARGET).rdb \ diff --git a/bridges/test/java_uno/acquire/testacquire.map b/bridges/test/java_uno/acquire/testacquire.map deleted file mode 100644 index 227274db9..000000000 --- a/bridges/test/java_uno/acquire/testacquire.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3.1 { - global: - component_getFactory; - component_getImplementationEnvironment; - component_writeInfo; - local: - *; -}; diff --git a/bridges/test/java_uno/any/makefile.mk b/bridges/test/java_uno/any/makefile.mk index 564ee80c2..888fae21d 100644 --- a/bridges/test/java_uno/any/makefile.mk +++ b/bridges/test/java_uno/any/makefile.mk @@ -100,16 +100,16 @@ $(SLOFILES) : $(MISC)$/gen_files.flag $(JAVACLASSFILES) : $(MISC)$/gen_files.flag ALLTAR : \ - $(OUT)$/bin$/TestRemote$(SCRIPTEXT) \ - $(OUT)$/bin$/TestJni$(SCRIPTEXT) + $(OUT)$/bin$/TestRemote \ + $(OUT)$/bin$/TestJni -$(OUT)$/bin$/TestRemote$(SCRIPTEXT) : $(JAVACLASSFILES) +$(OUT)$/bin$/TestRemote : $(JAVACLASSFILES) -rm -f $@ echo java -classpath ..$/class$/test$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \ test.java_uno.anytest.TestRemote > $@ $(GIVE_EXEC_RIGHTS) $@ -$(OUT)$/bin$/TestJni$(SCRIPTEXT) : $(JAVACLASSFILES) +$(OUT)$/bin$/TestJni : $(JAVACLASSFILES) -rm -f $@ echo '$(AUGMENT_LIBRARY_PATH)' java -classpath \ .$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \ diff --git a/bridges/test/java_uno/any/test_javauno_any.map b/bridges/test/java_uno/any/test_javauno_any.map index 4959db8fc..c50f7b162 100644 --- a/bridges/test/java_uno/any/test_javauno_any.map +++ b/bridges/test/java_uno/any/test_javauno_any.map @@ -1,4 +1,4 @@ -UDK_3.1 { +UDK_3_0_0 { global: Java_test_java_1uno_anytest_TestJni_create_1jni_1transport; local: diff --git a/bridges/test/java_uno/equals/makefile.mk b/bridges/test/java_uno/equals/makefile.mk index 3b7185849..9ac266f80 100644 --- a/bridges/test/java_uno/equals/makefile.mk +++ b/bridges/test/java_uno/equals/makefile.mk @@ -50,7 +50,7 @@ SLOFILES = $(SLO)$/testequals.obj SHL1TARGET = testequals.uno SHL1OBJS = $(SLOFILES) SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) -SHL1VERSIONMAP = testequals.map +SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1IMPLIB = itestequals JAVAFILES = TestEquals.java @@ -58,7 +58,7 @@ JARFILES = juh.jar jurt.jar ridl.jar .INCLUDE: target.mk -ALLTAR: $(BIN)$/testequals$(SCRIPTEXT) +ALLTAR: $(BIN)$/testequals .IF "$(GUI)" == "WNT" GIVE_EXEC_RIGHTS = @echo @@ -81,7 +81,7 @@ $(MISC)$/$(TARGET).rdb: types.idl $(SLOFILES) $(JAVACLASSFILES): $(MISC)$/$(TARGET).rdb -$(BIN)$/testequals$(SCRIPTEXT): $(BIN)$/testequals_services.rdb +$(BIN)$/testequals: $(BIN)$/testequals_services.rdb echo '$(AUGMENT_LIBRARY_PATH)' java -classpath \ ..$/class$/test$(PATH_SEPERATOR)..$/class$(PATH_SEPERATOR)\ ..$/class$/java_uno.jar$(PATH_SEPERATOR)$(EXEC_CLASSPATH) \ diff --git a/bridges/test/java_uno/equals/testequals.map b/bridges/test/java_uno/equals/testequals.map deleted file mode 100644 index 227274db9..000000000 --- a/bridges/test/java_uno/equals/testequals.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3.1 { - global: - component_getFactory; - component_getImplementationEnvironment; - component_writeInfo; - local: - *; -}; diff --git a/bridges/test/java_uno/nativethreadpool/makefile.mk b/bridges/test/java_uno/nativethreadpool/makefile.mk index 162c5c225..d4926e073 100644 --- a/bridges/test/java_uno/nativethreadpool/makefile.mk +++ b/bridges/test/java_uno/nativethreadpool/makefile.mk @@ -97,7 +97,7 @@ $(BIN)$/$(TARGET).rdb .ERRREMOVE: $(MISC)$/$(TARGET)$/types.rdb \ $(REGCOMP) -register -r $(MISC)$/$(TARGET)$/bootstrap.rdb \ -c javaloader.uno$(DLLPOST) -c javavm.uno$(DLLPOST) \ -c stocservices.uno$(DLLPOST) -.IF "$(GUI)" == "WNT" || "$(USE_SHELL)" != "bash" +.IF "$(GUI)" == "WNT" ERROR -- missing platform .ELSE # GUI, WNT + export OO_JAVA_PROPERTIES='RuntimeLib=$(JVM_LIB_URL)' && \ @@ -107,7 +107,7 @@ $(BIN)$/$(TARGET).rdb .ERRREMOVE: $(MISC)$/$(TARGET)$/types.rdb \ .ENDIF # GUI, WNT test .PHONY: $(SHL1TARGETN) $(BIN)$/$(TARGET).uno.jar $(BIN)$/$(TARGET).rdb -.IF "$(GUI)" == "WNT" || "$(USE_SHELL)" != "bash" +.IF "$(GUI)" == "WNT" ERROR -- missing platform .ELSE # GUI, WNT $(AUGMENT_LIBRARY_PATH) uno -c test.javauno.nativethreadpool.server \ diff --git a/cli_ure/source/basetypes/makefile.mk b/cli_ure/source/basetypes/makefile.mk index 83269c419..5547c32de 100644 --- a/cli_ure/source/basetypes/makefile.mk +++ b/cli_ure/source/basetypes/makefile.mk @@ -37,13 +37,6 @@ TARGET = basetypes .INCLUDE : $(PRJ)$/util$/target.pmk .INCLUDE : target.mk - -.IF "$(USE_SHELL)"!="4nt" -ECHOQUOTE=' -.ELSE -ECHOQUOTE= -.ENDIF - .IF "$(BUILD_FOR_CLI)" != "" .INCLUDE : $(BIN)$/cliureversion.mk @@ -73,15 +66,15 @@ CSFILES = \ .IF "$(CCNUMVER)" <= "001399999999" $(ASSEMBLY_ATTRIBUTES) : assembly.cs makefile.mk $(BIN)$/cliuno.snk $(BIN)$/cliureversion.mk $(GNUCOPY) -p assembly.cs $@ - echo $(ECHOQUOTE) \ - [assembly:System.Reflection.AssemblyVersion( "$(CLI_BASETYPES_NEW_VERSION)")] \ - [assembly:System.Reflection.AssemblyKeyFile(@"$(BIN)$/cliuno.snk")]$(ECHOQUOTE) \ + echo \ + '[assembly:System.Reflection.AssemblyVersion( "$(CLI_BASETYPES_NEW_VERSION)")] \ + [assembly:System.Reflection.AssemblyKeyFile(@"$(BIN)$/cliuno.snk")]' \ >> $@ .ELSE $(ASSEMBLY_ATTRIBUTES) : assembly.cs makefile.mk $(BIN)$/cliuno.snk $(BIN)$/cliureversion.mk $(GNUCOPY) -p assembly.cs $@ - echo $(ECHOQUOTE) \ - [assembly:System.Reflection.AssemblyVersion( "$(CLI_BASETYPES_NEW_VERSION)")]$(ECHOQUOTE) \ + echo \ + '[assembly:System.Reflection.AssemblyVersion( "$(CLI_BASETYPES_NEW_VERSION)")]' \ >> $@ .ENDIF diff --git a/cli_ure/source/climaker/makefile.mk b/cli_ure/source/climaker/makefile.mk index 8bea8f5c6..b001a1545 100644 --- a/cli_ure/source/climaker/makefile.mk +++ b/cli_ure/source/climaker/makefile.mk @@ -122,9 +122,7 @@ ALLTAR: \ #Create the config file that is used with the policy assembly $(CLIMAKER_CONFIG): climaker.exe.config $(COPY) $< $@ -.IF "$(USE_SHELL)"!="4nt" chmod +x $@ -.ENDIF # "$(USE_SHELL)"!="4nt" .IF "$(BUILD_FOR_CLI)" != "" diff --git a/cli_ure/source/native/makefile.mk b/cli_ure/source/native/makefile.mk index 333884bcd..2c8be1a9b 100644 --- a/cli_ure/source/native/makefile.mk +++ b/cli_ure/source/native/makefile.mk @@ -45,13 +45,6 @@ CCACHE_DISABLE=TRUE use_shl_versions= -.IF "$(USE_SHELL)"!="4nt" -ECHOQUOTE=' -.ELSE -ECHOQUOTE= -.ENDIF - - .IF "$(BUILD_FOR_CLI)" == "" #do not even build the cxx files because they contain cli cpp all: @@ -143,11 +136,11 @@ CFLAGSCXX += -clr:oldSyntax $(ASSEMBLY_ATTRIBUTES) : assembly.cxx $(BIN)$/cliuno.snk $(BIN)$/cliureversion.mk @echo $(ASSEMBLY_KEY_X) $(GNUCOPY) -p assembly.cxx $@ - echo $(ECHOQUOTE) \ - [assembly:System::Reflection::AssemblyVersion( "$(CLI_CPPUHELPER_NEW_VERSION)" )]; $(ECHOQUOTE) \ + echo \ + '[assembly:System::Reflection::AssemblyVersion( "$(CLI_CPPUHELPER_NEW_VERSION)" )];' \ >> $(OUT)$/misc$/assembly_cppuhelper.cxx - echo $(ECHOQUOTE) \ - [assembly:System::Reflection::AssemblyKeyFile($(ASSEMBLY_KEY_X))]; $(ECHOQUOTE) \ + echo \ + '[assembly:System::Reflection::AssemblyKeyFile($(ASSEMBLY_KEY_X))];' \ >> $(OUT)$/misc$/assembly_cppuhelper.cxx diff --git a/cli_ure/source/native/msvc.map b/cli_ure/source/native/msvc.map index 2fba6b6d3..429f750cc 100644 --- a/cli_ure/source/native/msvc.map +++ b/cli_ure/source/native/msvc.map @@ -1,4 +1,4 @@ -UDK_3.1 { +UDK_3_0_0 { global: local: diff --git a/cli_ure/source/ure/makefile.mk b/cli_ure/source/ure/makefile.mk index 29e9c7770..3e0290888 100644 --- a/cli_ure/source/ure/makefile.mk +++ b/cli_ure/source/ure/makefile.mk @@ -37,13 +37,6 @@ TARGET = ure .INCLUDE : $(PRJ)$/util$/target.pmk .INCLUDE : target.mk - -.IF "$(USE_SHELL)"!="4nt" -ECHOQUOTE=' -.ELSE -ECHOQUOTE= -.ENDIF - .IF "$(BUILD_FOR_CLI)" != "" .INCLUDE : $(BIN)$/cliureversion.mk @@ -69,15 +62,15 @@ CSFILES = \ .IF "$(CCNUMVER)" <= "001399999999" $(ASSEMBLY_ATTRIBUTES) : assembly.cs makefile.mk $(BIN)$/cliuno.snk $(BIN)$/cliureversion.mk $(GNUCOPY) -p assembly.cs $@ - echo $(ECHOQUOTE) \ - [assembly:System.Reflection.AssemblyVersion( "$(CLI_URE_NEW_VERSION)")] \ - [assembly:System.Reflection.AssemblyKeyFile(@"$(BIN)$/cliuno.snk")]$(ECHOQUOTE) \ + echo \ + '[assembly:System.Reflection.AssemblyVersion( "$(CLI_URE_NEW_VERSION)")] \ + [assembly:System.Reflection.AssemblyKeyFile(@"$(BIN)$/cliuno.snk")]' \ >> $@ .ELSE $(ASSEMBLY_ATTRIBUTES) : assembly.cs makefile.mk $(BIN)$/cliuno.snk $(BIN)$/cliureversion.mk $(GNUCOPY) -p assembly.cs $@ - echo $(ECHOQUOTE) \ - [assembly:System.Reflection.AssemblyVersion( "$(CLI_URE_NEW_VERSION)")]$(ECHOQUOTE) \ + echo \ + '[assembly:System.Reflection.AssemblyVersion( "$(CLI_URE_NEW_VERSION)")]' \ >> $@ .ENDIF diff --git a/cli_ure/version/makefile.mk b/cli_ure/version/makefile.mk index e71a63746..2b5913100 100644 --- a/cli_ure/version/makefile.mk +++ b/cli_ure/version/makefile.mk @@ -37,15 +37,6 @@ TARGET = cliureversion.mk .INCLUDE : $(PRJ)$/util$/target.pmk .INCLUDE : target.mk - -.IF "$(USE_SHELL)"!="4nt" -ECHOQUOTE=' -.ELSE -ECHOQUOTE= -.ENDIF - - - ALLTAR : \ $(BIN)$/cliureversion.mk diff --git a/codemaker/test/cppumaker/makefile.mk b/codemaker/test/cppumaker/makefile.mk index 3aa9dc65d..964ae166c 100644 --- a/codemaker/test/cppumaker/makefile.mk +++ b/codemaker/test/cppumaker/makefile.mk @@ -33,6 +33,8 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) + DLLPRE = # no leading "lib" on .so files INCPRE += $(MISC)$/$(TARGET)$/inc diff --git a/cppu/qa/makefile.mk b/cppu/qa/makefile.mk index 51d9dfe22..b40d3512e 100644 --- a/cppu/qa/makefile.mk +++ b/cppu/qa/makefile.mk @@ -33,6 +33,8 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) + DLLPRE = # no leading "lib" on .so files INCPRE += $(MISC)$/$(TARGET)$/inc diff --git a/cppuhelper/prj/build.lst b/cppuhelper/prj/build.lst index db8ddcaae..de66b2d61 100644 --- a/cppuhelper/prj/build.lst +++ b/cppuhelper/prj/build.lst @@ -3,3 +3,4 @@ ch cppuhelper usr1 - all ch_mkout NULL ch cppuhelper\inc nmake - all ch_include NULL ch cppuhelper\source nmake - all ch_source ch_unotypes ch_include NULL ch cppuhelper\unotypes nmake - all ch_unotypes NULL +ch cppuhelper\qa\propertysetmixin nmake - all ch_qa_propertysetmixin ch_source NULL diff --git a/cppuhelper/qa/ifcontainer/export.map b/cppuhelper/qa/ifcontainer/export.map index 4ca70fa85..879fa8953 100644 --- a/cppuhelper/qa/ifcontainer/export.map +++ b/cppuhelper/qa/ifcontainer/export.map @@ -1,4 +1,4 @@ -UDK_3.0 { +UDK_3_0_0 { global: registerAllTestFunction; diff --git a/cppuhelper/qa/ifcontainer/makefile.mk b/cppuhelper/qa/ifcontainer/makefile.mk index 1e93701d3..3277b4c20 100644 --- a/cppuhelper/qa/ifcontainer/makefile.mk +++ b/cppuhelper/qa/ifcontainer/makefile.mk @@ -35,6 +35,7 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) # BEGIN ---------------------------------------------------------------- # auto generated Target:joblist by codegen.pl diff --git a/cppuhelper/qa/propertysetmixin/comp.map b/cppuhelper/qa/propertysetmixin/comp.map deleted file mode 100644 index 7af0a8f02..000000000 --- a/cppuhelper/qa/propertysetmixin/comp.map +++ /dev/null @@ -1,36 +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. -# -#************************************************************************* - -UDK_3_0_0 { - global: - component_getFactory; - component_getImplementationEnvironment; - component_writeInfo; - - local: - *; -}; diff --git a/cppuhelper/qa/propertysetmixin/makefile.mk b/cppuhelper/qa/propertysetmixin/makefile.mk index 8bf652d33..edd4795fc 100644 --- a/cppuhelper/qa/propertysetmixin/makefile.mk +++ b/cppuhelper/qa/propertysetmixin/makefile.mk @@ -25,46 +25,44 @@ # #************************************************************************* -PRJ := ..$/.. +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + +PRJ := ../.. PRJNAME := cppuhelper TARGET := qa_propertysetmixin -PACKAGE = test$/cppuhelper$/propertysetmixin$/comp +PACKAGE = test/cppuhelper/propertysetmixin/comp ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk -.IF "$(GUI)" == "WNT" -FILEURLPREFIX = file:/// -MY_URE_INTERNAL_JAVA_DIR=$(strip $(subst,\,/ file:///$(shell @$(WRAPCMD) echo $(SOLARBINDIR)))) +.IF "$(OS)" == "WNT" +my_file = file:/// .ELSE -FILEURLPREFIX = file:// -MY_URE_INTERNAL_JAVA_DIR=file://$(SOLARBINDIR) -.ENDIF - - +my_file = file:// +.END DLLPRE = # no leading "lib" on .so files -INCPRE += -I$(MISC)$/$(TARGET)$/inc +INCPRE += -I$(MISC)/$(TARGET)/inc +CFLAGSCXX += $(CPPUNIT_CFLAGS) SHL1TARGET = $(TARGET) -SHL1OBJS = $(SLO)$/test_propertysetmixin.obj -SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB) +SHL1OBJS = $(SLO)/test_propertysetmixin.obj +SHL1VERSIONMAP = test.map +SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) SHL1IMPLIB = i$(SHL1TARGET) +SHL1RPATH = NONE DEF1NAME = $(SHL1TARGET) -.IF "$(COMNAME)" == "gcc3" -SHL1VERSIONMAP = test.gcc3.map -.ELSE -SHL1VERSIONMAP = test.map -.ENDIF - SHL2TARGET = $(TARGET).uno -SHL2OBJS = $(SLO)$/comp_propertysetmixin.obj -SHL2VERSIONMAP = comp.map +SHL2OBJS = $(SLO)/comp_propertysetmixin.obj +SHL2VERSIONMAP = $(SOLARENV)/src/component.map SHL2STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) SHL2IMPLIB = i$(SHL2TARGET) +SH21RPATH = NONE DEF2NAME = $(SHL2TARGET) SLOFILES = $(SHL1OBJS) $(SHL2OBJS) @@ -76,63 +74,52 @@ JARFILES = java_uno.jar juh.jar jurt.jar ridl.jar ALLTAR: test -$(MISC)$/$(TARGET)$/types.urd: types.idl +$(MISC)/$(TARGET)/types.urd: types.idl - $(MKDIR) $(@:d) $(IDLC) -O$(@:d) -I$(SOLARIDLDIR) -cid -we $< -$(MISC)$/$(TARGET)$/types.rdb .ERRREMOVE: $(MISC)$/$(TARGET)$/types.urd +$(MISC)/$(TARGET)/types.rdb: $(MISC)/$(TARGET)/types.urd - $(RM) $@ $(REGMERGE) $@ /UCR $< -$(MISC)$/$(TARGET)$/uno.rdb .ERRREMOVE: $(MISC)$/$(TARGET)$/types.rdb \ - $(DLLDEST)$/$(SHL2TARGET)$(DLLPOST) \ - $(MISC)$/$(TARGET)$/$(TARGET).uno.jar $(MISC)$/$(TARGET)$/bootstrap.rdb +$(MISC)/$(TARGET)/uno.rdb: $(MISC)/$(TARGET)/types.rdb $(SHL2TARGETN) \ + $(MISC)/$(TARGET)/$(TARGET).uno.jar $(MISC)/$(TARGET)/bootstrap.rdb - $(MKDIR) $(@:d) - $(COPY) $(SOLARBINDIR)$/types.rdb $@ - $(REGMERGE) $@ / $(MISC)$/$(TARGET)$/types.rdb - $(REGCOMP) -register -r $@ -c javaloader.uno$(DLLPOST) \ - -c javavm.uno$(DLLPOST) -c reflection.uno$(DLLPOST) \ - -c stocservices.uno$(DLLPOST) - $(REGCOMP) -register -r $@ \ - -c $(subst,$/,/ $(DLLDEST)$/$(SHL2TARGET)$(DLLPOST)) - $(REGCOMP) -register -br $(MISC)$/$(TARGET)$/bootstrap.rdb -r $@ \ - -c \ - $(subst,$/,/ $(FILEURLPREFIX)$(PWD)$/$(MISC)$/$(TARGET)$/$(TARGET).uno.jar) \ - -classpath $(CLASSPATH) \ - -env:URE_INTERNAL_JAVA_DIR=$(MY_URE_INTERNAL_JAVA_DIR) - -$(MISC)$/$(TARGET)$/bootstrap.rdb .ERRREMOVE: + $(COPY) $(SOLARBINDIR)/types.rdb $@ + $(REGMERGE) $@ / $(MISC)/$(TARGET)/types.rdb + $(REGCOMP) -register -r $@ -wop -c javaloader.uno -c javavm.uno \ + -c reflection.uno -c stocservices.uno -c $(SHL2TARGETN) + $(REGCOMP) -register -br $(MISC)/$(TARGET)/bootstrap.rdb -r $@ \ + -c $(my_file)$(PWD)/$(MISC)/$(TARGET)/$(TARGET).uno.jar \ + -env:URE_INTERNAL_JAVA_DIR=$(my_file)$(SOLARBINDIR) + +$(MISC)/$(TARGET)/bootstrap.rdb: - $(MKDIR) $(@:d) - $(COPY) $(SOLARBINDIR)$/types.rdb $@ - $(REGCOMP) -register -r $@ -c javaloader.uno$(DLLPOST) \ - -c javavm.uno$(DLLPOST) -c stocservices.uno$(DLLPOST) + $(COPY) $(SOLARBINDIR)/types.rdb $@ + $(REGCOMP) -register -r $@ -wop -c javaloader.uno -c javavm.uno \ + -c stocservices.uno -$(MISC)$/$(TARGET)$/cppumaker.flag: $(MISC)$/$(TARGET)$/types.rdb - $(CPPUMAKER) -O$(MISC)$/$(TARGET)$/inc -BUCR -Gc \ - -X$(SOLARBINDIR)$/types.rdb $< +$(MISC)/$(TARGET)/cppumaker.flag: $(MISC)/$(TARGET)/types.rdb + $(CPPUMAKER) -O$(MISC)/$(TARGET)/inc -BUCR -Gc \ + -X$(SOLARBINDIR)/types.rdb $< $(TOUCH) $@ -$(SLOFILES): $(MISC)$/$(TARGET)$/cppumaker.flag +$(SLOFILES): $(MISC)/$(TARGET)/cppumaker.flag -$(MISC)$/$(TARGET)$/javamaker.flag: $(MISC)$/$(TARGET)$/types.rdb - $(JAVAMAKER) -O$(CLASSDIR) -BUCR -nD -Gc -X$(SOLARBINDIR)$/types.rdb $< +$(MISC)/$(TARGET)/javamaker.flag: $(MISC)/$(TARGET)/types.rdb + $(JAVAMAKER) -O$(CLASSDIR) -BUCR -nD -Gc -X$(SOLARBINDIR)/types.rdb $< $(TOUCH) $@ -# The following dependency (to execute javac whenever javamaker has run) does -# not work reliably, see #i28827#: -$(JAVAFILES) $(JAVACLASSFILES): $(MISC)$/$(TARGET)$/javamaker.flag +$(JAVATARGET): $(MISC)/$(TARGET)/javamaker.flag -$(MISC)$/$(TARGET)$/$(TARGET).uno.jar: $(JAVACLASSFILES) \ - $(MISC)$/$(TARGET)$/javamaker.flag manifest +$(MISC)/$(TARGET)/$(TARGET).uno.jar: $(JAVATARGET) \ + $(MISC)/$(TARGET)/javamaker.flag manifest jar cfm $@ manifest -C $(CLASSDIR) test/cppuhelper/propertysetmixin -test .PHONY: $(SHL1TARGETN) $(MISC)$/$(TARGET)$/uno.rdb -.IF "$(GUI)" == "WNT" - set CLASSPATH=$(CLASSPATH) && \ - set URE_INTERNAL_JAVA_DIR=$(MY_URE_INTERNAL_JAVA_DIR) && \ - testshl2 $(SHL1TARGETN) -forward "$(MISC)$/$(TARGET)$/uno.rdb#$(SOLARBINDIR)" -.ELSE - setenv CLASSPATH $(CLASSPATH) && \ - setenv URE_INTERNAL_JAVA_DIR $(MY_URE_INTERNAL_JAVA_DIR) && \ - testshl2 $(SHL1TARGETN) -forward "$(MISC)$/$(TARGET)$/uno.rdb#$(SOLARLIBDIR)" -.ENDIF +test .PHONY: $(SHL1TARGETN) $(MISC)/$(TARGET)/uno.rdb + $(CPPUNITTESTER) $(SHL1TARGETN) \ + -env:URE_INTERNAL_JAVA_DIR=$(my_file)$(SOLARBINDIR) \ + -env:URE_INTERNAL_LIB_DIR=$(my_file)$(SOLARSHAREDBIN) \ + -env:arg-reg=$(MISC)/$(TARGET)/uno.rdb -env:arg-path=$(SOLARSHAREDBIN) + +.END diff --git a/cppuhelper/qa/propertysetmixin/test.gcc3.map b/cppuhelper/qa/propertysetmixin/test.gcc3.map deleted file mode 100644 index 241e40bb0..000000000 --- a/cppuhelper/qa/propertysetmixin/test.gcc3.map +++ /dev/null @@ -1,36 +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. -# -#************************************************************************* - -UDK_3_0_0 { - global: - registerAllTestFunction; - - _ZN4_STL7num_put*; # STLport - - local: - *; -}; diff --git a/cppuhelper/qa/propertysetmixin/test.map b/cppuhelper/qa/propertysetmixin/test.map index f313c44bd..0dbbcc5a7 100644 --- a/cppuhelper/qa/propertysetmixin/test.map +++ b/cppuhelper/qa/propertysetmixin/test.map @@ -27,7 +27,7 @@ UDK_3_0_0 { global: - registerAllTestFunction; + cppunitTestPlugIn; local: *; diff --git a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx index 9f134d7f3..82256c634 100644 --- a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx +++ b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx @@ -61,9 +61,12 @@ #include "com/sun/star/uno/XComponentContext.hpp" #include "cppuhelper/implbase1.hxx" #include "cppuhelper/servicefactory.hxx" -#include "testshl/simpleheader.hxx" +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" #include "osl/mutex.hxx" -#include "osl/thread.h" +#include "rtl/bootstrap.hxx" #include "rtl/ref.hxx" #include "rtl/string.h" #include "rtl/textenc.h" @@ -95,6 +98,14 @@ std::ostream & operator <<(std::ostream & out, css::uno::Any const & value) { out << "com::sun::star::uno::Any[" << value.getValueType() << ", ...]"; } +rtl::OUString getArgument(rtl::OUString const & name) { + rtl::OUString val; + CPPUNIT_ASSERT( + rtl::Bootstrap::get( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("arg-")) + name, val)); + return val; +} + class BoundListener: public cppu::WeakImplHelper1< css::beans::XPropertyChangeListener > { @@ -219,17 +230,12 @@ void Test::setUp() { // single component context is used for all tests and destroyed in the last // pseudo-test "finish": if (!m_context.is()) { - char const * fw = getForwardString(); - rtl::OUString forward(fw, rtl_str_getLength(fw), - osl_getThreadTextEncoding()); - //TODO: check for string conversion failure - sal_Int32 index = forward.indexOf('#'); - rtl::OUString registry = forward.copy(0, index); - rtl::OUString bootstrappath = forward.copy(index+1); - css::uno::Reference< css::lang::XMultiComponentFactory > factory( cppu::createRegistryServiceFactory( - registry, sal_False, bootstrappath), + getArgument(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("reg"))), + sal_False, + getArgument( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("path")))), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::beans::XPropertySet >( factory, css::uno::UNO_QUERY_THROW)->getPropertyValue( @@ -667,8 +673,8 @@ void Test::testFull( css::uno::Reference< css::uno::XComponentContext > Test::m_context; -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/cppuhelper/qa/unourl/export.map b/cppuhelper/qa/unourl/export.map index 4ca70fa85..879fa8953 100644 --- a/cppuhelper/qa/unourl/export.map +++ b/cppuhelper/qa/unourl/export.map @@ -1,4 +1,4 @@ -UDK_3.0 { +UDK_3_0_0 { global: registerAllTestFunction; diff --git a/cppuhelper/qa/unourl/makefile.mk b/cppuhelper/qa/unourl/makefile.mk index 9c4e3bc86..de2c05d40 100644 --- a/cppuhelper/qa/unourl/makefile.mk +++ b/cppuhelper/qa/unourl/makefile.mk @@ -35,6 +35,7 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) # BEGIN ---------------------------------------------------------------- # auto generated Target:joblist by codegen.pl diff --git a/cppuhelper/qa/weak/makefile.mk b/cppuhelper/qa/weak/makefile.mk index 771edb26c..543e87118 100644 --- a/cppuhelper/qa/weak/makefile.mk +++ b/cppuhelper/qa/weak/makefile.mk @@ -33,6 +33,7 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) DLLPRE = # no leading "lib" on .so files SHL1TARGET = $(TARGET) diff --git a/cppuhelper/test/cfg_test.map b/cppuhelper/test/cfg_test.map deleted file mode 100644 index ac2c3750b..000000000 --- a/cppuhelper/test/cfg_test.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/idlc/source/makefile.mk b/idlc/source/makefile.mk index 37da1509a..879090d15 100644 --- a/idlc/source/makefile.mk +++ b/idlc/source/makefile.mk @@ -120,11 +120,7 @@ YACCFLAGS+=-v .INCLUDE : target.mk $(MISC)$/stripped_scanner.ll : scanner.ll -.IF "$(GUI)"=="UNX" || "$(USE_SHELL)" != "4nt" tr -d "\015" < scanner.ll > $(MISC)$/stripped_scanner.ll -.ELSE - cat scanner.ll > $(MISC)$/stripped_scanner.ll -.ENDIF $(MISC)$/scanner.cxx: $(MISC)$/stripped_scanner.ll flex -o$(MISC)$/scanner.cxx $(MISC)$/stripped_scanner.ll diff --git a/io/source/TextInputStream/makefile.mk b/io/source/TextInputStream/makefile.mk index 6613c392d..3c0cd5c57 100644 --- a/io/source/TextInputStream/makefile.mk +++ b/io/source/TextInputStream/makefile.mk @@ -40,7 +40,7 @@ SLOFILES= \ $(SLO)$/TextInputStream.obj SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = tinstrm.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1STDLIBS= \ $(SALLIB) \ diff --git a/io/source/TextInputStream/tinstrm.map b/io/source/TextInputStream/tinstrm.map deleted file mode 100644 index 30c5bb729..000000000 --- a/io/source/TextInputStream/tinstrm.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/io/source/TextOutputStream/makefile.mk b/io/source/TextOutputStream/makefile.mk index cf3f09345..ad78178f8 100644 --- a/io/source/TextOutputStream/makefile.mk +++ b/io/source/TextOutputStream/makefile.mk @@ -41,7 +41,7 @@ SLOFILES= \ $(SLO)$/TextOutputStream.obj SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = toutstrm.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1STDLIBS= \ $(SALLIB) \ diff --git a/io/source/TextOutputStream/toutstrm.map b/io/source/TextOutputStream/toutstrm.map deleted file mode 100644 index 30c5bb729..000000000 --- a/io/source/TextOutputStream/toutstrm.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/io/source/acceptor/acceptor.map b/io/source/acceptor/acceptor.map deleted file mode 100644 index 30c5bb729..000000000 --- a/io/source/acceptor/acceptor.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/io/source/acceptor/makefile.mk b/io/source/acceptor/makefile.mk index 5a33ca3f0..3da3fbe18 100644 --- a/io/source/acceptor/makefile.mk +++ b/io/source/acceptor/makefile.mk @@ -52,7 +52,7 @@ SLOFILES= \ $(SLO)$/acc_socket.obj SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = acceptor.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1RPATH=URELIB SHL1STDLIBS= \ diff --git a/io/source/connector/connectr.map b/io/source/connector/connectr.map deleted file mode 100644 index 30c5bb729..000000000 --- a/io/source/connector/connectr.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/io/source/connector/makefile.mk b/io/source/connector/makefile.mk index de3e92284..7f12b850f 100644 --- a/io/source/connector/makefile.mk +++ b/io/source/connector/makefile.mk @@ -52,7 +52,7 @@ SLOFILES= \ $(SLO)$/ctr_socket.obj SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = connectr.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1RPATH=URELIB SHL1STDLIBS= \ diff --git a/io/source/stm/makefile.mk b/io/source/stm/makefile.mk index ff16516bb..a6a163eca 100644 --- a/io/source/stm/makefile.mk +++ b/io/source/stm/makefile.mk @@ -53,7 +53,7 @@ SLOFILES = $(SLO)$/opipe.obj\ $(SLO)$/opump.obj SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = stm.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1STDLIBS= \ $(SALLIB) \ diff --git a/io/source/stm/stm.map b/io/source/stm/stm.map deleted file mode 100644 index 30c5bb729..000000000 --- a/io/source/stm/stm.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/javaunohelper/source/javaunohelper.map b/javaunohelper/source/javaunohelper.map index a7bf6b072..dcbe0506a 100644 --- a/javaunohelper/source/javaunohelper.map +++ b/javaunohelper/source/javaunohelper.map @@ -1,4 +1,4 @@ -UDK_3.1 { +UDK_3_0_0 { global: Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo; Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory; diff --git a/jvmaccess/util/cc5_solaris_sparc.map b/jvmaccess/util/cc5_solaris_sparc.map index 09d7ba756..307229033 100644 --- a/jvmaccess/util/cc5_solaris_sparc.map +++ b/jvmaccess/util/cc5_solaris_sparc.map @@ -25,7 +25,7 @@ # #************************************************************************* -UDK_3.1 { +UDK_3_0_0 { global: # jvmaccess/virtualmachine.hxx: __1cJjvmaccessOVirtualMachineLAttachGuardRCreationException2t6M_v_; # jvmaccess::VirtualMachine::AttachGuard::CreationException::CreationException() @@ -52,7 +52,7 @@ UDK_3.2 { __1cJjvmaccesscQ__RTTI__1CpnJjvmaccessOVirtualMachineLAttachGuardRCreationException__; # RTTI for jvmaccess::VirtualMachine::AttachGuard::CreationException * __1cJjvmaccesscR__RTTI__1CpknJjvmaccessOVirtualMachineLAttachGuardRCreationException__; # RTTI for jvmaccess::VirtualMachine::AttachGuard::CreationException const * __1cJjvmaccessOVirtualMachine2t5B6MpnHJavaVM__ibpnHJNIEnv___v_; # jvmaccess::VirtualMachine::VirtualMachine(JavaVM *, int, bool, JNIEnv *) #Nvariant 1 -} UDK_3.1; +} UDK_3_0_0; UDK_3.3 { global: diff --git a/jvmaccess/util/gcc3.map b/jvmaccess/util/gcc3.map index 6702986aa..2a888d9c2 100644 --- a/jvmaccess/util/gcc3.map +++ b/jvmaccess/util/gcc3.map @@ -25,7 +25,7 @@ # #************************************************************************* -UDK_3.1 { +UDK_3_0_0 { global: # jvmaccess/virtualmachine.hxx: _ZN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionC1Ev; # jvmaccess::VirtualMachine::AttachGuard::CreationException::CreationException() @@ -59,7 +59,7 @@ UDK_3.2 { # We put the '*' at the beginning because its unlikely that these symbols will ever be a postfix of another symbol. _*ZN9jvmaccess14VirtualMachineC1EP10_Jv_JavaVMibP10_Jv_JNIEnv; # jvmaccess::VirtualMachine::VirtualMachine(JavaVM *, int, bool, JNIEnv *) _*ZN9jvmaccess14VirtualMachineC2EP10_Jv_JavaVMibP10_Jv_JNIEnv; # jvmaccess::VirtualMachine::VirtualMachine(JavaVM *, int, bool, JNIEnv *) -} UDK_3.1; +} UDK_3_0_0; UDK_3.3 { global: diff --git a/jvmaccess/util/msvc_win32_intel.map b/jvmaccess/util/msvc_win32_intel.map index fd148b189..4620b1caa 100644 --- a/jvmaccess/util/msvc_win32_intel.map +++ b/jvmaccess/util/msvc_win32_intel.map @@ -1,4 +1,4 @@ -UDK_3.1 { +UDK_3_0_0 { global: # jvmaccess/virtualmachine.hxx: ??0CreationException@AttachGuard@VirtualMachine@jvmaccess@@QAE@XZ; # jvmaccess::VirtualMachine::AttachGuard::CreationException::CreationException() @@ -15,7 +15,7 @@ UDK_3.1 { UDK_3.2 { global: -} UDK_3.1; +} UDK_3_0_0; UDK_3.3 { global: diff --git a/offapi/com/sun/star/rendering/TexturingMode.idl b/offapi/com/sun/star/rendering/TexturingMode.idl index 9f140353a..9dfcef6f6 100644 --- a/offapi/com/sun/star/rendering/TexturingMode.idl +++ b/offapi/com/sun/star/rendering/TexturingMode.idl @@ -36,13 +36,24 @@ module com { module sun { module star { module rendering { */ constants TexturingMode { + /** Pixel outside the texture area are fully transparent.<p> + + This completely switches off pixel generation outside the + texture coordinate range [0,1]. This results in only one + instance of the texture generated per textured primitive.<p> + */ + const byte NONE=0; + + //------------------------------------------------------------------------- + /** Clamp texture coordinate.<p> - This value clamps the texture coordinate to the range + This value clamps the texture coordinates to the range [0,1]. This results in only one instance of the texture - generated per textured primitive.<p> + generated per textured primitive, with the remaining area + filled with the color of the outermost texels<p> */ - const byte CLAMP=0; + const byte CLAMP=1; //------------------------------------------------------------------------- @@ -51,7 +62,7 @@ constants TexturingMode This value repeats the texture over the textured primitive, for the given texture coordinate.<p> */ - const byte REPEAT=1; + const byte REPEAT=2; }; }; }; }; }; diff --git a/offapi/com/sun/star/rendering/XGraphicDevice.idl b/offapi/com/sun/star/rendering/XGraphicDevice.idl index aabc07d7a..749f43cc9 100644 --- a/offapi/com/sun/star/rendering/XGraphicDevice.idl +++ b/offapi/com/sun/star/rendering/XGraphicDevice.idl @@ -45,12 +45,12 @@ #ifndef __com_sun_star_rendering_XBezierPolyPolygon2D_idl__ #include <com/sun/star/rendering/XBezierPolyPolygon2D.idl> #endif -#ifndef __com_sun_star_rendering_XParametricPolyPolygon2DFactory_idl__ -#include <com/sun/star/rendering/XParametricPolyPolygon2DFactory.idl> -#endif #ifndef __com_sun_star_rendering_XColorSpace_idl__ #include <com/sun/star/rendering/XColorSpace.idl> #endif +#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__ +#include <com/sun/star/lang/XMultiServiceFactory.idl> +#endif module com { module sun { module star { module rendering { @@ -217,8 +217,67 @@ interface XGraphicDevice : ::com::sun::star::uno::XInterface this is not advisable: each canvas implementation is free to internally generate optimized parametric polygons, which can be used more directly for e.g. texturing operations. + + <pre> + Available services (all canvas implementations should provide + this minimal set, though are free to add more; just check the + getAvailableServiceNames() on the returned interface): + + - Gradients - all gradients need to support two construction + parameters, "Colors" being a <type>sequence<Color></type> + and "Stops" being a <type>sequence<double></type>. Both must + have the same length, and at least two elements. See + http://www.w3.org/TR/SVG11/pservers.html#GradientStops for + the semantics of gradient stops and colors. + Required gradient services: + + * "LinearGradient" - the gradient varies linearly between + the given colors. without coordinate system + transformation, the color interpolation happens in + increasing x direction, and is constant in y + direction. Equivalent to svg linear gradient + http://www.w3.org/TR/SVG11/pservers.html#LinearGradients + + * "EllipticalGradient" - this gradient has zeroth color + index in the middle, and varies linearly between center + and final color. The services takes an additional + parameter named "AspectRatio" of <type>double</type> + (width divided by height), if this aspect ratio is 1, the + gradient is circular. If it's not 1, the gradient is + elliptical, with the special twist that the aspect ratio + is maintained also for the center color: the gradient will + not collapse into a single point, but become a line of + center color. If "AspectRatio" is missing, or equal to 1, + this gradient yields similar results as the svg radial + gradient + http://www.w3.org/TR/SVG11/pservers.html#RadialGradients + + * "RectangularGradient" - this gradient has zeroth color + index in the middle, and varies linearly between center + and final color via rectangular boxes + around the center point. The services takes an additional + parameter named "AspectRatio" of <type>double</type> + (width divided by height), if this aspect ratio is 1, the + gradient is quadratic. If it's not 1, the gradient is + rectangular, with the special twist that the aspect ratio + is maintained also for the center color: the gradient will + not collapse into a single point, but become a line of + center color. + + - Hatch patterns - Required hatch services: + + * "VerticalLineHatch" - this hatching consists of vertical lines + * "OrthogonalLinesHatch" - this hatching consists of + crossing vertical and horizontal lines + * "ThreeCrossingLinesHatch" - this hatching consists of + vertical and horizontal lines plus diagonal lines from + left, top to bottom, right. + * "FourCrossingLinesHatch" - this hatching consists of + vertical and horizontal lines plus diagonal lines in both + directions. + </pre> */ - XParametricPolyPolygon2DFactory getParametricPolyPolygonFactory(); + com::sun::star::lang::XMultiServiceFactory getParametricPolyPolygonFactory(); //------------------------------------------------------------------------- diff --git a/offapi/com/sun/star/rendering/XParametricPolyPolygon2DFactory.idl b/offapi/com/sun/star/rendering/XParametricPolyPolygon2DFactory.idl deleted file mode 100644 index 45a104379..000000000 --- a/offapi/com/sun/star/rendering/XParametricPolyPolygon2DFactory.idl +++ /dev/null @@ -1,152 +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 __com_sun_star_rendering_XParametricPolyPolygon2DFactory_idl__ -#define __com_sun_star_rendering_XParametricPolyPolygon2DFactory_idl__ - -#ifndef __com_sun_star_uno_XInterface_idl__ -#include <com/sun/star/uno/XInterface.idl> -#endif -#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ -#include <com/sun/star/lang/IllegalArgumentException.idl> -#endif -#ifndef __com_sun_star_geometry_RealRectangle2D_idl__ -#include <com/sun/star/geometry/RealRectangle2D.idl> -#endif -#ifndef __com_sun_star_rendering_XColorSpace_idl__ -#include <com/sun/star/rendering/XColorSpace.idl> -#endif - - -module com { module sun { module star { module rendering { - -interface XParametricPolyPolygon2D; - -/** This interface provides factory methods to generate various - ready-made XParametricPolyPolygon2Ds - */ -interface XParametricPolyPolygon2DFactory : ::com::sun::star::uno::XInterface -{ - /** Create a linear gradient. - - The gradient varies linearly between colors. the color positions on <0, 1> interval are given by stops values - in the x direction, and has constant color for fixed x - coordinate value in y direction - */ - XParametricPolyPolygon2D createLinearHorizontalGradient( [in] sequence<Color> colors, [in] sequence<double> stops ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create an axial gradient. - - The gradient has middleColor in the middle, and varies - linearly between middleColor and endColor to both sides in the - x direction. For fixed x coordinate, the gradient has constant - color value in y direction. - */ - XParametricPolyPolygon2D createAxialHorizontalGradient( [in] sequence<Color> colors, [in] sequence<double> stops ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create an elliptical gradient. - - The gradient has centerColor in the middle, and varies - linearly between center and endColor via concentric ellipses - around the center point. Note that the absolute size of the - rectangle given at this method does not matter, only it's - aspect ratio: if this aspect ratio is 1, the gradient is - circular. If it's not 1, the gradient is elliptical, with the - special twist that the aspect ratio is maintained also for the - center color: the gradient will not collapse into a single - point, but become a line of center color. - */ - XParametricPolyPolygon2D createEllipticalGradient( [in] sequence<Color> colors, [in] sequence<double> stops, [in] ::com::sun::star::geometry::RealRectangle2D boundRect ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create a rectangular gradient. - - The gradient has centerColor in the middle, and varies - linearly between center and endColor via rectangular boxes - around the center point. Note that the absolute size of the - rectangle given at this method does not matter, only it's - aspect ratio: if this aspect ratio is 1, the gradient is - quadratic. If it's not 1, the gradient is rectangular, with - the special twist that the aspect ratio is maintained also for - the center color: the gradient will not collapse into a single - point, but become a line of center color. - */ - XParametricPolyPolygon2D createRectangularGradient( [in] sequence<Color> colors, [in] sequence<double> stops, [in] ::com::sun::star::geometry::RealRectangle2D boundRect ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create a line hash of vertical lines. - - The hashing consists of vertical lines, with colors varying - linearly between leftColor and rightColor, when going from - left to right - */ - XParametricPolyPolygon2D createVerticalLinesHatch( [in] sequence<ColorComponent> leftColor, [in] sequence<ColorComponent> rightColor ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create a line hash of orthogonally crossing lines. - - The hashing consists of vertical and horizontal lines, with - colors varying linearly between leftTopColor and - rightBottomColor, when going from left to right (for the - vertical lines) and from top tzo bottom (for the horizontal - lines). - */ - XParametricPolyPolygon2D createOrthogonalLinesHatch( [in] sequence<ColorComponent> leftTopColor, [in] sequence<ColorComponent> rightBottomColor ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create a repeating line hash pattern of three crossing lines. - - The hashing consists of vertical and horizontal lines plus - diagonal lines from left, top to bottom, right. Each of the - three groups of lines varies the line color of distinct lines - linearly from startColor to endColor, starting at the leftmost - or topmost position. - */ - XParametricPolyPolygon2D createThreeCrossingLinesHatch( [in] sequence<ColorComponent> startColor, [in] sequence<ColorComponent> endColor ) - raises (com::sun::star::lang::IllegalArgumentException); - - /** Create a repeating line hash pattern of four crossing lines. - - The hashing consists of vertical and horizontal lines plus - diagonal lines in both directions. Each of the four groups of - lines varies the line color of distinct lines linearly from - startColor to endColor, starting at the leftmost or topmost - position. - */ - XParametricPolyPolygon2D createFourCrossingLinesHatch( [in] sequence<ColorComponent> startColor, [in] sequence<ColorComponent> endColor ) - raises (com::sun::star::lang::IllegalArgumentException); -}; - -//============================================================================= - -/// Service providing a <type>XParametricPolyPolygon2DFactory</type> service -service ParametricPolyPolygon2DFactory: XParametricPolyPolygon2DFactory; - -}; }; }; }; - -#endif diff --git a/offapi/com/sun/star/rendering/makefile.mk b/offapi/com/sun/star/rendering/makefile.mk index 3ed9cf9c2..6b59d156d 100644 --- a/offapi/com/sun/star/rendering/makefile.mk +++ b/offapi/com/sun/star/rendering/makefile.mk @@ -104,7 +104,6 @@ IDLFILES=\ XIntegerReadOnlyBitmap.idl \ XLinePolyPolygon2D.idl \ XParametricPolyPolygon2D.idl \ - XParametricPolyPolygon2DFactory.idl \ XPolyPolygon2D.idl \ XSimpleCanvas.idl \ XSprite.idl \ diff --git a/remotebridges/source/bridge/makefile.mk b/remotebridges/source/bridge/makefile.mk index 6c217b273..1b712bef1 100644 --- a/remotebridges/source/bridge/makefile.mk +++ b/remotebridges/source/bridge/makefile.mk @@ -43,7 +43,7 @@ SLOFILES= \ $(SLO)$/bridge_connection.obj\ $(SLO)$/bridge_provider.obj SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = remotebridge.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1STDLIBS= \ $(SALLIB) \ diff --git a/remotebridges/source/bridge/remotebridge.map b/remotebridges/source/bridge/remotebridge.map deleted file mode 100644 index 30c5bb729..000000000 --- a/remotebridges/source/bridge/remotebridge.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/remotebridges/source/factory/brdgfctr.map b/remotebridges/source/factory/brdgfctr.map deleted file mode 100644 index 30c5bb729..000000000 --- a/remotebridges/source/factory/brdgfctr.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/remotebridges/source/factory/makefile.mk b/remotebridges/source/factory/makefile.mk index 4f0a6d044..7cd3875bc 100644 --- a/remotebridges/source/factory/makefile.mk +++ b/remotebridges/source/factory/makefile.mk @@ -43,7 +43,7 @@ SLOFILES= \ $(SLO)$/bridgeimpl.obj SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = brdgfctr.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1STDLIBS= \ $(SALLIB) \ diff --git a/remotebridges/source/unourl_resolver/makefile.mk b/remotebridges/source/unourl_resolver/makefile.mk index 7eea4e7cf..a3e4af7f0 100644 --- a/remotebridges/source/unourl_resolver/makefile.mk +++ b/remotebridges/source/unourl_resolver/makefile.mk @@ -43,7 +43,7 @@ SLOFILES= \ $(SLO)$/unourl_resolver.obj SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = uuresolver.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1STDLIBS= \ $(SALLIB) \ diff --git a/remotebridges/source/unourl_resolver/uuresolver.map b/remotebridges/source/unourl_resolver/uuresolver.map deleted file mode 100644 index 30c5bb729..000000000 --- a/remotebridges/source/unourl_resolver/uuresolver.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx new file mode 100644 index 000000000..1082e6ff9 --- /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/stoc/test/registry_tdprovider/testregistrytdprovider.gcc3.map b/sal/cppunittester/makefile.mk index 47cdf07f7..938b63d90 100644 --- a/stoc/test/registry_tdprovider/testregistrytdprovider.gcc3.map +++ b/sal/cppunittester/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # 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 @@ -23,16 +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: - component_getFactory; - component_getImplementationEnvironment; - component_writeInfo; +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 e9b13ee4d..d12d4a1ce 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 a526774a3..12ef8c595 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 f21baf0dc..c98df9fae 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 f77fe75e4..6b5dd2e22 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 39f13cd33..3754479d8 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 02722abec..ab8421b61 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 c0a21cc1a..e107abea0 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 40dfa4c8b..a2e645426 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 5622d80ed..c96c3977f 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 bcd9c0e2c..3ce270bbb 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 02198e1ee..6f1bff24a 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 a13529da5..000000000 --- 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 4727a0cc5..972444ca8 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 004408948..d0e5f2565 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 a13529da5..000000000 --- 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 c7e3a2a37..d46168dc4 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 3fd2b19d7..2b091f440 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 59fe3ba22..dc905ac60 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 647b8ad47..b10bc3d56 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 e9b19ca5b..0dbbcc5a7 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 b5a117b0d..17e219e9c 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 4ec1e56c8..de4121e3a 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 1b7166bc3..6b6f7a256 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 360d689e4..966875667 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 a13529da5..000000000 --- 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 23ae77d2b..6350cdba0 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 44a00ccd4..5a6e9afc5 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 d96a915d8..000000000 --- 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 0b70655ea..000000000 --- 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 aa99e25f7..a95db211c 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 887948a85..f22c1b117 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 3cab9d650..000000000 --- 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 e77a6deea..000000000 --- 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 edb084687..000000000 --- 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 ea22fbc27..37ae3718b 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 e17f3c410..d32f9db35 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 73bf673f6..b89e392d7 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 c936b51a3..6bd3bd89d 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 fceb9eac8..415183b7e 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 a914dfa86..b13ccf420 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 490ee7b22..329769b5d 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 92e3d30dd..9b52e0a45 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 a5cd21da6..3b35e52ab 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 bfb6c74c3..06469b38a 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 e65611410..6f1563765 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 7ba01bceb..544f7b7df 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 ef79fc46c..5df9dc015 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 b97599240..cd57ec9bc 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 e1a5dd3af..3c1b92196 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/gcc3_export.map b/sal/qa/rtl/textenc/gcc3_export.map deleted file mode 100644 index 241e40bb0..000000000 --- a/sal/qa/rtl/textenc/gcc3_export.map +++ /dev/null @@ -1,36 +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. -# -#************************************************************************* - -UDK_3_0_0 { - global: - registerAllTestFunction; - - _ZN4_STL7num_put*; # STLport - - local: - *; -}; diff --git a/sal/qa/rtl/textenc/makefile.mk b/sal/qa/rtl/textenc/makefile.mk index 1126c0fac..597309d9b 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 1858f5864..d4a8814cc 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 93890f0da..40e583f8b 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 6de6cc25c..82ebbc811 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 diff --git a/salhelper/inc/salhelper/queue.hxx b/salhelper/inc/salhelper/queue.hxx index 1699a3b7e..a2ded2d60 100644 --- a/salhelper/inc/salhelper/queue.hxx +++ b/salhelper/inc/salhelper/queue.hxx @@ -93,6 +93,12 @@ public: //---------------------------------------------------------------------------- +/** Queue. + + @deprecated + Must not be used, as it internally uses unnamed semaphores, which are not + supported on Mac OS X. +*/ template<class element_type> class Queue : protected QueueBase<element_type> { @@ -130,6 +136,12 @@ public: //---------------------------------------------------------------------------- +/** Bounded queue. + + @deprecated + Must not be used, as it internally uses unnamed semaphores, which are not + supported on Mac OS X. +*/ template<class element_type> class BoundedQueue : protected Queue<element_type> { diff --git a/salhelper/qa/makefile.mk b/salhelper/qa/makefile.mk index 1ce9ccb6f..fe2aff745 100644 --- a/salhelper/qa/makefile.mk +++ b/salhelper/qa/makefile.mk @@ -33,6 +33,8 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) + SHL1TARGET = $(TARGET) SHL1OBJS = $(SLO)$/test_api.obj SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB) $(SALHELPERLIB) $(TESTSHL2LIB) diff --git a/salhelper/source/makefile.mk b/salhelper/source/makefile.mk index 4eb278f42..a6b83cb5e 100644 --- a/salhelper/source/makefile.mk +++ b/salhelper/source/makefile.mk @@ -48,11 +48,6 @@ SLOFILES= \ $(SLO)$/dynload.obj \ $(SLO)$/simplereferenceobject.obj -# SCO: the linker does know about weak symbols, but we can't ignore multiple defined symbols -.IF "$(OS)"=="SCO" -SLOFILES+=$(SLO)$/staticmb.obj -.ENDIF - .IF "$(GUI)" == "WNT" SHL1TARGET= $(TARGET)$(UDK_MAJOR)$(COMID) .ELIF "$(GUI)" == "OS2" diff --git a/salhelper/source/staticmb.cxx b/salhelper/source/staticmb.cxx deleted file mode 100644 index 41cf7b326..000000000 --- a/salhelper/source/staticmb.cxx +++ /dev/null @@ -1,26 +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. - * - ************************************************************************/ diff --git a/salhelper/test/rtti/sols.map b/salhelper/test/rtti/sols.map index 962d64847..babf2c901 100644 --- a/salhelper/test/rtti/sols.map +++ b/salhelper/test/rtti/sols.map @@ -1,4 +1,4 @@ -SAMPLELIB { +UDK_3_0_0 { global: GetVersionInfo; _fini; diff --git a/stoc/prj/build.lst b/stoc/prj/build.lst index 2550563c8..1fb7d34ee 100644 --- a/stoc/prj/build.lst +++ b/stoc/prj/build.lst @@ -22,3 +22,4 @@ tc stoc\source\javavm nmake - all tc_jvm tc_inc NULL tc stoc\source\javaloader nmake - all tc_jvload tc_inc NULL tc stoc\source\uriproc nmake - all tc_uriproc tc_stserv tc_inc NULL tc stoc\util nmake - all tc_util tc_boot tc_stserv tc_tcv tc_uriproc tc_smgr tc_inc tc_sreg tc_defr tc_ireg tc_regtd tc_tdmng tc_sec NULL +tc stoc\test\uriproc nmake - all tc_test_uriproc tc_util NULL diff --git a/stoc/source/corereflection/corefl.map b/stoc/source/corereflection/corefl.map deleted file mode 100644 index 30c5bb729..000000000 --- a/stoc/source/corereflection/corefl.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/stoc/source/corereflection/makefile.mk b/stoc/source/corereflection/makefile.mk index 1a37f93b4..b61eb13aa 100644 --- a/stoc/source/corereflection/makefile.mk +++ b/stoc/source/corereflection/makefile.mk @@ -55,7 +55,7 @@ NOOPTFILES += $(SLO)$/criface.obj .ENDIF SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = corefl.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1STDLIBS= \ $(CPPULIB) \ $(CPPUHELPERLIB) \ diff --git a/stoc/source/inspect/introspection.map b/stoc/source/inspect/introspection.map deleted file mode 100644 index c2806d230..000000000 --- a/stoc/source/inspect/introspection.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3.1 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/stoc/source/inspect/makefile.mk b/stoc/source/inspect/makefile.mk index 3a5630d13..80e87dbf7 100644 --- a/stoc/source/inspect/makefile.mk +++ b/stoc/source/inspect/makefile.mk @@ -50,7 +50,7 @@ SHL1STDLIBS= \ $(CPPUHELPERLIB) \ $(SALLIB) -SHL1VERSIONMAP = introspection.map +SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1RPATH=URELIB SHL1DEPN= diff --git a/stoc/source/invocation/inv.map b/stoc/source/invocation/inv.map deleted file mode 100644 index 30c5bb729..000000000 --- a/stoc/source/invocation/inv.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/stoc/source/invocation/makefile.mk b/stoc/source/invocation/makefile.mk index 8e50bfba1..c170bf6b6 100644 --- a/stoc/source/invocation/makefile.mk +++ b/stoc/source/invocation/makefile.mk @@ -50,7 +50,7 @@ SHL1STDLIBS= \ $(CPPUHELPERLIB) \ $(SALLIB) -SHL1VERSIONMAP = inv.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1DEPN= SHL1IMPLIB= i$(TARGET) SHL1LIBS= $(SLB)$/$(TARGET).lib diff --git a/stoc/source/invocation_adapterfactory/invadp.map b/stoc/source/invocation_adapterfactory/invadp.map deleted file mode 100644 index 30c5bb729..000000000 --- a/stoc/source/invocation_adapterfactory/invadp.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/stoc/source/invocation_adapterfactory/makefile.mk b/stoc/source/invocation_adapterfactory/makefile.mk index 2edb30ea5..66568af03 100644 --- a/stoc/source/invocation_adapterfactory/makefile.mk +++ b/stoc/source/invocation_adapterfactory/makefile.mk @@ -50,7 +50,7 @@ SHL1STDLIBS= \ $(CPPUHELPERLIB) \ $(SALLIB) -SHL1VERSIONMAP = invadp.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1RPATH=URELIB SHL1DEPN= diff --git a/stoc/source/javaloader/javaloader.map b/stoc/source/javaloader/javaloader.map deleted file mode 100644 index ac2c3750b..000000000 --- a/stoc/source/javaloader/javaloader.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/stoc/source/javaloader/makefile.mk b/stoc/source/javaloader/makefile.mk index ef35b6921..60eea6a23 100644 --- a/stoc/source/javaloader/makefile.mk +++ b/stoc/source/javaloader/makefile.mk @@ -52,7 +52,7 @@ SHL1STDLIBS=\ $(SALLIB) \ $(JVMACCESSLIB) -SHL1VERSIONMAP = javaloader.map +SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1DEPN= SHL1IMPLIB= i$(TARGET) SHL1LIBS= $(SLB)$/$(TARGET).lib diff --git a/stoc/source/javavm/jen.map b/stoc/source/javavm/jen.map deleted file mode 100644 index ac2c3750b..000000000 --- a/stoc/source/javavm/jen.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/stoc/source/javavm/makefile.mk b/stoc/source/javavm/makefile.mk index 4be9d87f4..96908d10d 100644 --- a/stoc/source/javavm/makefile.mk +++ b/stoc/source/javavm/makefile.mk @@ -54,7 +54,7 @@ SLOFILES= \ $(SLO)$/interact.obj SHL1TARGET= $(TARGET) -SHL1VERSIONMAP = jen.map +SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1STDLIBS= \ $(CPPUHELPERLIB) \ $(CPPULIB) \ diff --git a/stoc/source/namingservice/makefile.mk b/stoc/source/namingservice/makefile.mk index 00015b35e..424180e11 100644 --- a/stoc/source/namingservice/makefile.mk +++ b/stoc/source/namingservice/makefile.mk @@ -50,7 +50,7 @@ SHL1STDLIBS= \ $(CPPUHELPERLIB) \ $(SALLIB) -SHL1VERSIONMAP = namingservice.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1DEPN= SHL1IMPLIB= i$(TARGET) diff --git a/stoc/source/namingservice/namingservice.map b/stoc/source/namingservice/namingservice.map deleted file mode 100644 index 30c5bb729..000000000 --- a/stoc/source/namingservice/namingservice.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/stoc/source/proxy_factory/makefile.mk b/stoc/source/proxy_factory/makefile.mk index bcb630cb0..b38dac146 100644 --- a/stoc/source/proxy_factory/makefile.mk +++ b/stoc/source/proxy_factory/makefile.mk @@ -45,7 +45,7 @@ SLOFILES= \ $(SLO)$/proxyfac.obj SHL1TARGET=$(TARGET) -SHL1VERSIONMAP = proxyfac.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1STDLIBS= \ $(CPPULIB) \ diff --git a/stoc/source/proxy_factory/proxyfac.map b/stoc/source/proxy_factory/proxyfac.map deleted file mode 100644 index 30c5bb729..000000000 --- a/stoc/source/proxy_factory/proxyfac.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/stoc/test/registry_tdprovider/makefile.mk b/stoc/test/registry_tdprovider/makefile.mk index 0b8666921..f258963f9 100644 --- a/stoc/test/registry_tdprovider/makefile.mk +++ b/stoc/test/registry_tdprovider/makefile.mk @@ -40,16 +40,11 @@ SLOFILES = $(SLO)$/testregistrytdprovider.obj SHL1TARGET = testregistrytdprovider.uno SHL1OBJS = $(SLOFILES) +SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) SHL1IMPLIB = itestregistrytdprovider DEF1NAME = $(SHL1TARGET) -.IF "$(COMNAME)" == "gcc3" -SHL1VERSIONMAP = testregistrytdprovider.gcc3.map -.ELSE -SHL1VERSIONMAP = testregistrytdprovider.map -.ENDIF - .INCLUDE: target.mk ALLTAR: test diff --git a/stoc/test/registry_tdprovider/testregistrytdprovider.map b/stoc/test/registry_tdprovider/testregistrytdprovider.map deleted file mode 100644 index 7af0a8f02..000000000 --- a/stoc/test/registry_tdprovider/testregistrytdprovider.map +++ /dev/null @@ -1,36 +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. -# -#************************************************************************* - -UDK_3_0_0 { - global: - component_getFactory; - component_getImplementationEnvironment; - component_writeInfo; - - local: - *; -}; diff --git a/stoc/test/tdmanager/makefile.mk b/stoc/test/tdmanager/makefile.mk index e3276b19e..8f39ac552 100644 --- a/stoc/test/tdmanager/makefile.mk +++ b/stoc/test/tdmanager/makefile.mk @@ -40,16 +40,11 @@ SLOFILES = $(SLO)$/testtdmanager.obj SHL1TARGET = testtdmanager.uno SHL1OBJS = $(SLOFILES) +SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) SHL1IMPLIB = itesttdmanager DEF1NAME = $(SHL1TARGET) -.IF "$(COMNAME)" == "gcc3" -SHL1VERSIONMAP = testtdmanager.gcc3.map -.ELSE -SHL1VERSIONMAP = testtdmanager.map -.ENDIF - .INCLUDE: target.mk ALLTAR: test diff --git a/stoc/test/tdmanager/testtdmanager.gcc3.map b/stoc/test/tdmanager/testtdmanager.gcc3.map deleted file mode 100644 index 47cdf07f7..000000000 --- a/stoc/test/tdmanager/testtdmanager.gcc3.map +++ /dev/null @@ -1,38 +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. -# -#************************************************************************* - -UDK_3_0_0 { - global: - component_getFactory; - component_getImplementationEnvironment; - component_writeInfo; - - _ZN4_STL7num_put*; # STLport - - local: - *; -}; diff --git a/stoc/test/tdmanager/testtdmanager.map b/stoc/test/tdmanager/testtdmanager.map deleted file mode 100644 index 7af0a8f02..000000000 --- a/stoc/test/tdmanager/testtdmanager.map +++ /dev/null @@ -1,36 +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. -# -#************************************************************************* - -UDK_3_0_0 { - global: - component_getFactory; - component_getImplementationEnvironment; - component_writeInfo; - - local: - *; -}; diff --git a/stoc/test/testsmgr_cpnt.map b/stoc/test/testsmgr_cpnt.map index d8c4047c5..ab5ed357b 100644 --- a/stoc/test/testsmgr_cpnt.map +++ b/stoc/test/testsmgr_cpnt.map @@ -1,4 +1,4 @@ -UDK_3.1 { +UDK_3_0_0 { global: component_getImplementationEnvironment; component_writeInfo; diff --git a/stoc/test/uriproc/makefile.mk b/stoc/test/uriproc/makefile.mk index d529f8623..cfdc33e75 100644 --- a/stoc/test/uriproc/makefile.mk +++ b/stoc/test/uriproc/makefile.mk @@ -25,7 +25,11 @@ # #************************************************************************* -PRJ := ..$/.. +.IF "$(OOO_SUBSEQUENT_TESTS)" == "" +nothing .PHONY: +.ELSE + +PRJ := ../.. PRJNAME := stoc TARGET := test_uriproc @@ -33,27 +37,14 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) DLLPRE = # no leading "lib" on .so files -UNOTYPES = \ - com.sun.star.beans.XPropertySet \ - com.sun.star.lang.XComponent \ - com.sun.star.lang.XMultiComponentFactory \ - com.sun.star.uno.XComponentContext \ - com.sun.star.uri.ExternalUriReferenceTranslator \ - com.sun.star.uri.UriReferenceFactory \ - com.sun.star.uri.VndSunStarPkgUrlReferenceFactory \ - com.sun.star.uri.XExternalUriReferenceTranslator \ - com.sun.star.uri.XUriReference \ - com.sun.star.uri.XUriReferenceFactory \ - com.sun.star.uri.XVndSunStarPkgUrlReferenceFactory \ - com.sun.star.uri.XVndSunStarScriptUrlReference \ - com.sun.star.util.XMacroExpander - SHL1TARGET = $(TARGET) -SHL1OBJS = $(SLO)$/test_uriproc.obj -SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB) +SHL1OBJS = $(SLO)/test_uriproc.obj +SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) SHL1VERSIONMAP = version.map +SHL1RPATH = NONE SHL1IMPLIB = i$(SHL1TARGET) DEF1NAME = $(SHL1TARGET) @@ -61,11 +52,24 @@ SLOFILES = $(SHL1OBJS) .INCLUDE: target.mk +.IF "$(OS)" == "WNT" +my_file = file:/// +.ELSE +my_file = file:// +.END + ALLTAR: test -$(BIN)$/$(TARGET).rdb .ERRREMOVE: - $(COPY) $(SOLARBINDIR)$/types.rdb $@ - regcomp -register -r $@ -c $(subst,$/,/ $(DLLDEST)$/stocservices.uno$(DLLPOST)) +test .PHONY: $(SHL1TARGETN) $(MISC)/$(TARGET)/services.rdb + $(CPPUNITTESTER) $(SHL1TARGETN) \ + -env:UNO_SERVICES=$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb \ + -env:UNO_TYPES=$(my_file)$(SOLARBINDIR)/udkapi.rdb \ + -env:OOO_TEST_PREFIX=$(my_file)$(PWD)/$(DLLDEST)/ + +$(MISC)/$(TARGET)/services.rdb: + $(MKDIRHIER) $(@:d) + $(RM) $@ + $(REGCOMP) -register -r $@ -wop=vnd.sun.star.expand:\$${{OOO_TEST_PREFIX}} \ + -c $(DLLDEST)/stocservices.uno$(DLLPOST) -test .PHONY: $(SHL1TARGETN) $(BIN)$/$(TARGET).rdb - testshl2 $(SHL1TARGETN) -forward $(BIN)$/$(TARGET).rdb +.END diff --git a/stoc/test/uriproc/test_uriproc.cxx b/stoc/test/uriproc/test_uriproc.cxx index 5fff670f5..899d94951 100644 --- a/stoc/test/uriproc/test_uriproc.cxx +++ b/stoc/test/uriproc/test_uriproc.cxx @@ -28,7 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_stoc.hxx" -#include "com/sun/star/beans/XPropertySet.hpp" #include "com/sun/star/lang/XComponent.hpp" #include "com/sun/star/lang/XMultiComponentFactory.hpp" #include "com/sun/star/uno/Reference.hxx" @@ -43,10 +42,12 @@ #include "com/sun/star/uri/XVndSunStarPkgUrlReferenceFactory.hpp" #include "com/sun/star/uri/XVndSunStarScriptUrlReference.hpp" #include "com/sun/star/util/XMacroExpander.hpp" -#include "cppuhelper/servicefactory.hxx" -#include "testshl/simpleheader.hxx" +#include "cppuhelper/bootstrap.hxx" +#include "cppunit/TestAssert.h" +#include "cppunit/TestFixture.h" +#include "cppunit/extensions/HelperMacros.h" +#include "cppunit/plugin/TestPlugIn.h" #include "osl/diagnose.h" -#include "osl/thread.h" #include "rtl/string.h" #include "rtl/string.hxx" #include "rtl/textenc.h" @@ -148,20 +149,12 @@ private: }; void Test::setUp() { - char const * registry = getForwardString(); - css::uno::Reference< css::lang::XMultiServiceFactory > factory( - cppu::createRegistryServiceFactory( - rtl::OUString( - registry, rtl_str_getLength(registry), - osl_getThreadTextEncoding()))); - //TODO: check for string conversion failure - css::uno::Reference< css::beans::XPropertySet >( - factory, css::uno::UNO_QUERY_THROW)->getPropertyValue( - rtl::OUString::createFromAscii("DefaultContext")) >>= m_context; + m_context = cppu::defaultBootstrap_InitialComponentContext(); m_uriFactory = css::uri::UriReferenceFactory::create(m_context); } void Test::tearDown() { + m_uriFactory.clear(); css::uno::Reference< css::lang::XComponent >( m_context, css::uno::UNO_QUERY_THROW)->dispose(); } @@ -1004,8 +997,8 @@ void Test::testPkgUrlFactory() { } } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/stoc/test/uriproc/version.map b/stoc/test/uriproc/version.map index f313c44bd..0dbbcc5a7 100644 --- a/stoc/test/uriproc/version.map +++ b/stoc/test/uriproc/version.map @@ -27,7 +27,7 @@ UDK_3_0_0 { global: - registerAllTestFunction; + cppunitTestPlugIn; local: *; diff --git a/stoc/util/bootstrap.map b/stoc/util/bootstrap.map deleted file mode 100644 index 30c5bb729..000000000 --- a/stoc/util/bootstrap.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/stoc/util/makefile.mk b/stoc/util/makefile.mk index af2ed92ed..4243d4551 100644 --- a/stoc/util/makefile.mk +++ b/stoc/util/makefile.mk @@ -50,7 +50,7 @@ LIB1FILES= $(SLB)$/bootstrap.lib \ $(SLB)$/regtypeprov.lib \ $(SLB)$/typemgr.lib -SHL1VERSIONMAP = bootstrap.map +SHL1VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL1STDLIBS= \ $(CPPULIB) \ @@ -75,7 +75,7 @@ LIB2FILES= \ $(SLB)$/typeconverter.lib \ $(SLB)$/uriproc.lib -SHL2VERSIONMAP = stocservices.map +SHL2VERSIONMAP = $(SOLARENV)/src/unloadablecomponent.map SHL2STDLIBS= \ $(CPPULIB) \ diff --git a/stoc/util/stocservices.map b/stoc/util/stocservices.map deleted file mode 100644 index 30c5bb729..000000000 --- a/stoc/util/stocservices.map +++ /dev/null @@ -1,9 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - component_canUnload; - local: - *; -}; diff --git a/ure/source/uretest/version.map b/ure/source/uretest/version.map index a0ed354e7..7d305778d 100644 --- a/ure/source/uretest/version.map +++ b/ure/source/uretest/version.map @@ -34,6 +34,8 @@ UDK_3_0_0 { _ZTI*; _ZTS*; + _ZN4_STL7num_put*; # for STLport + local: *; }; |