tests build now under solaris

This commit is contained in:
Jörg Budischewski 2000-10-13 05:49:11 +00:00
parent f198ed89a1
commit 265f1356d9
5 changed files with 33 additions and 28 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: factory.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:43:13 $
* last change: $Author: jbu $ $Date: 2000-10-13 06:49:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -60,12 +60,13 @@
************************************************************************/
#include <rtl/strbuf.hxx>
namespace sax_test {
Reference< XInterface > SAL_CALL OSaxWriterTest_CreateInstance(
const Reference< XMultiServiceFactory > & rSMgr ) throw ( Exception );
OUString OSaxWriterTest_getServiceName( ) throw();
OUString OSaxWriterTest_getImplementationName( ) throw();
Sequence<OUString> OSaxWriterTest_getSupportedServiceNames( ) throw();
}
#define BUILD_ERROR(expr, Message)\
{\
m_seqErrors.realloc( m_seqErrors.getLength() + 1 ); \

View file

@ -2,9 +2,9 @@
*
* $RCSfile: testsax.cxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:43:13 $
* last change: $Author: jbu $ $Date: 2000-10-13 06:49:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -97,6 +97,8 @@ using namespace ::com::sun::star::xml::sax;
*
****/
namespace sax_test {
class OSaxParserTest : public WeakImplHelper1< XSimpleTest >
{
public:
@ -269,7 +271,7 @@ Reference < XInputStream > createStreamFromSequence(
const Reference < XMultiServiceFactory > &xSMgr )
{
Reference < XInterface > xOutStreamService =
xSMgr->createInstance( L"com.sun.star.io.Pipe" );
xSMgr->createInstance( OUString::createFromAscii("com.sun.star.io.Pipe") );
assert( xOutStreamService.is() );
Reference< XOutputStream > rOutStream( xOutStreamService , UNO_QUERY );
assert( rOutStream.is() );
@ -812,7 +814,8 @@ void OSaxParserTest::testPerformance( const Reference < XParser > & rParser )
}
}
}
}
using namespace sax_test;
extern "C"
{
@ -836,16 +839,16 @@ sal_Bool SAL_CALL component_writeInfo(
reinterpret_cast< XRegistryKey * >( pRegistryKey ) );
OUString str =
OUString( L"/" ) +
OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) +
OSaxParserTest_getImplementationName() +
OUString( L"/UNO/SERVICES" );
OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") );
Reference< XRegistryKey > xNewKey = xKey->createKey( str );
xNewKey->createKey( OSaxParserTest_getServiceName() );
str =
OUString( L"/" ) +
OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) +
OSaxWriterTest_getImplementationName() +
OUString( L"/UNO/SERVICES" );
OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") );
xNewKey = xKey->createKey( str );
xNewKey->createKey( OSaxWriterTest_getServiceName() );

View file

@ -2,9 +2,9 @@
*
* $RCSfile: testwriter.cxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:43:13 $
* last change: $Author: jbu $ $Date: 2000-10-13 06:49:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -90,6 +90,8 @@ using namespace ::com::sun::star::xml::sax;
#include "factory.hxx"
namespace sax_test {
class OFileWriter :
public WeakImplHelper1< XOutputStream >
{
@ -381,7 +383,7 @@ void OSaxWriterTest::testInvariant( const OUString& TestName,
const Reference < XInterface >& TestObject )
throw ( IllegalArgumentException, RuntimeException)
{
if( L"com.sun.star.xml.sax.Writer" == TestName ) {
if( OUString::createFromAscii("com.sun.star.xml.sax.Writer") == TestName ) {
Reference< XDocumentHandler > doc( TestObject , UNO_QUERY );
Reference< XExtendedDocumentHandler > ext( TestObject , UNO_QUERY );
Reference< XActiveDataSource > source( TestObject , UNO_QUERY );
@ -595,7 +597,7 @@ void OSaxWriterTest::testExceptions( const Reference< XExtendedDocumentHandler >
sal_Bool bException = sal_True;
try
{
r->startElement( L"huhu" , rList );
r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("huhu")) , rList );
bException = sal_False;
}
catch( SAXException &e )
@ -683,7 +685,7 @@ void OSaxWriterTest::testPerformance(const Reference< XExtendedDocumentHandler
// just write a bunch of xml tags !
// for performance testing
sal_Int32 i2;
for( i2 = 0 ; i2 < 15 ; i2 ++ )
for( i2 = 0 ; i2 < 75 ; i2 ++ )
{
r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("tag") ) +
OUString::valueOf( i2 ), rList );
@ -697,7 +699,7 @@ void OSaxWriterTest::testPerformance(const Reference< XExtendedDocumentHandler
r->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM("huhu")) );
}
}
for( i2 = 14 ; i2 >= 0 ; i2-- )
for( i2 = 74 ; i2 >= 0 ; i2-- )
{
r->ignorableWhitespace( OUString() );
r->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM("tag") ) + OUString::valueOf( i2 ) );
@ -712,3 +714,4 @@ void OSaxWriterTest::testPerformance(const Reference< XExtendedDocumentHandler
printf( "Performance writing : %g s\n" , fEnd - fStart );
}
}

View file

@ -2,9 +2,9 @@
*
* $RCSfile: saxdemo.cxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:43:13 $
* last change: $Author: jbu $ $Date: 2000-10-13 06:49:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -561,9 +561,7 @@ int main (int argc, char **argv)
#ifdef SAL_W32
OUString aDllName = OStringToOUString( "sax" , RTL_TEXTENCODING_ASCII_US );
#else
OUString aDllName = OUString::createFromAscii( "lib" );
aDllName += OStringToOUString( argv[n] , RTL_TEXTENCODING_ASCII_US );
aDllName += OUString::createFromAscii( ".so" );
OUString aDllName = OUString::createFromAscii( "libsax.so" );
#endif
xReg->registerImplementation(
OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ),

View file

@ -2,9 +2,9 @@
*
* $RCSfile: testcomponent.cxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:43:13 $
* last change: $Author: jbu $ $Date: 2000-10-13 06:49:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -134,9 +134,9 @@ int main (int argc, char **argv)
#ifdef SAL_W32
OUString aDllName = OStringToOUString( argv[n] , RTL_TEXTENCODING_ASCII_US );
#else
OUString aDllName = L"lib";
OUString aDllName = OUString( RTL_CONSTASCII_USTRINGPARAM("lib"));
aDllName += OStringToOUString( argv[n] , RTL_TEXTENCODING_ASCII_US );
aDllName += L".so";
aDllName += OUString( RTL_CONSTASCII_USTRINGPARAM(".so"));
#endif
xReg->registerImplementation(
OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ),
@ -161,9 +161,9 @@ int main (int argc, char **argv)
#ifdef SAL_W32
OUString aDllName = OStringToOUString( sTestName , RTL_TEXTENCODING_ASCII_US );
#else
OUString aDllName = L"lib";
OUString aDllName = OUString( RTL_CONSTASCII_USTRINGPARAM("lib"));
aDllName += OStringToOUString( sTestName , RTL_TEXTENCODING_ASCII_US );
aDllName += L".so";
aDllName += OUString( RTL_CONSTASCII_USTRINGPARAM(".so"));
#endif
xReg->registerImplementation(