diff options
Diffstat (limited to 'sax/test')
-rw-r--r-- | sax/test/sax/factory.hxx | 7 | ||||
-rw-r--r-- | sax/test/sax/testsax.cxx | 19 | ||||
-rw-r--r-- | sax/test/sax/testwriter.cxx | 15 | ||||
-rw-r--r-- | sax/test/saxdemo.cxx | 8 | ||||
-rw-r--r-- | sax/test/testcomponent.cxx | 12 |
5 files changed, 33 insertions, 28 deletions
diff --git a/sax/test/sax/factory.hxx b/sax/test/sax/factory.hxx index a4fea3a5c20b..fecd054c997e 100644 --- a/sax/test/sax/factory.hxx +++ b/sax/test/sax/factory.hxx @@ -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 ); \ diff --git a/sax/test/sax/testsax.cxx b/sax/test/sax/testsax.cxx index 6de45e7acf38..53cad3f8c219 100644 --- a/sax/test/sax/testsax.cxx +++ b/sax/test/sax/testsax.cxx @@ -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() ); diff --git a/sax/test/sax/testwriter.cxx b/sax/test/sax/testwriter.cxx index 5f06cf602abe..773886808f91 100644 --- a/sax/test/sax/testwriter.cxx +++ b/sax/test/sax/testwriter.cxx @@ -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 ); } +} diff --git a/sax/test/saxdemo.cxx b/sax/test/saxdemo.cxx index f4c57425864c..00e8bd29ef0c 100644 --- a/sax/test/saxdemo.cxx +++ b/sax/test/saxdemo.cxx @@ -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" ), diff --git a/sax/test/testcomponent.cxx b/sax/test/testcomponent.cxx index 582bf423bc48..09b07801bc9e 100644 --- a/sax/test/testcomponent.cxx +++ b/sax/test/testcomponent.cxx @@ -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( |