1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: testfactreg.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #include <rtl/strbuf.hxx>
32 Reference
< XInterface
> SAL_CALL
OPipeTest_CreateInstance( const Reference
< XMultiServiceFactory
> & rSMgr
) throw( Exception
);
33 Sequence
<OUString
> OPipeTest_getSupportedServiceNames(void) throw();
34 OUString
OPipeTest_getServiceName() throw();
35 OUString
OPipeTest_getImplementationName() throw();
37 Reference
< XInterface
> SAL_CALL
OPumpTest_CreateInstance( const Reference
< XMultiServiceFactory
> & rSMgr
) throw( Exception
);
38 Sequence
<OUString
> OPumpTest_getSupportedServiceNames(void) throw();
39 OUString
OPumpTest_getServiceName() throw();
40 OUString
OPumpTest_getImplementationName() throw();
42 Reference
< XInterface
> SAL_CALL
ODataStreamTest_CreateInstance( const Reference
< XMultiServiceFactory
> & rSMgr
) throw(Exception
);
43 Sequence
<OUString
> ODataStreamTest_getSupportedServiceNames( int i
) throw();
44 OUString
ODataStreamTest_getServiceName( int i
) throw();
45 OUString
ODataStreamTest_getImplementationName( int i
) throw();
47 Reference
< XInterface
> SAL_CALL
OMarkableOutputStreamTest_CreateInstance( const Reference
< XMultiServiceFactory
> & rSMgr
) throw(Exception
);
48 Sequence
<OUString
> OMarkableOutputStreamTest_getSupportedServiceNames(void) throw();
49 OUString
OMarkableOutputStreamTest_getServiceName() throw();
50 OUString
OMarkableOutputStreamTest_getImplementationName() throw();
52 Reference
< XInterface
> SAL_CALL
OMarkableInputStreamTest_CreateInstance( const Reference
< XMultiServiceFactory
> & rSMgr
) throw(Exception
);
53 Sequence
<OUString
> OMarkableInputStreamTest_getSupportedServiceNames(void) throw();
54 OUString
OMarkableInputStreamTest_getServiceName() throw();
55 OUString
OMarkableInputStreamTest_getImplementationName() throw();
57 Reference
< XInterface
> SAL_CALL
OObjectStreamTest_CreateInstance( const Reference
< XMultiServiceFactory
> & rSMgr
) throw(Exception
);
58 Sequence
<OUString
> OObjectStreamTest_getSupportedServiceNames( int i
) throw();
59 OUString
OObjectStreamTest_getServiceName( int i
) throw();
60 OUString
OObjectStreamTest_getImplementationName( int i
) throw();
62 Reference
< XInterface
> SAL_CALL
OMyPersistObject_CreateInstance( const Reference
< XMultiServiceFactory
> & rSMgr
) throw(Exception
);
63 Sequence
<OUString
> OMyPersistObject_getSupportedServiceNames( ) throw();
64 OUString
OMyPersistObject_getServiceName( ) throw();
65 OUString
OMyPersistObject_getImplementationName( ) throw();
67 Sequence
<sal_Int8
> createSeq( char * p
);
68 Sequence
<sal_Int8
> createIntSeq( sal_Int32 i
);
70 #define BUILD_ERROR(expr, Message)\
72 m_seqErrors.realloc( m_seqErrors.getLength() + 1 ); \
73 m_seqExceptions.realloc( m_seqExceptions.getLength() + 1 ); \
74 OStringBuffer str(128); \
75 str.append( __FILE__ );\
78 str.append( OString::valueOf( (sal_Int32)__LINE__) );\
81 str.append( #expr ); \
82 str.append( " ] : " ); \
83 str.append( Message ); \
84 m_seqErrors.getArray()[ m_seqErrors.getLength()-1] =\
85 OStringToOUString( str.makeStringAndClear() , RTL_TEXTENCODING_ASCII_US ); \
90 #define WARNING_ASSERT(expr, Message) \
92 m_seqWarnings.realloc( m_seqErrors.getLength() +1 ); \
93 OStringBuffer str(128);\
94 str.append( __FILE__);\
97 str.append(OString::valueOf( (sal_Int32)__LINE__)) ;\
100 str.append( #expr ); \
101 str.append( " ] : ") ; \
102 str.append( Message); \
103 m_seqWarnings.getArray()[ m_seqWarnings.getLength()-1] =\
104 OStringToOUString( str.makeStringAndClear() , RTL_TEXTENCODING_ASCII_US ); \
109 #define ERROR_ASSERT(expr, Message) \
111 BUILD_ERROR(expr, Message );\
116 #define ERROR_EXCEPTION_ASSERT(expr, Message, Exception) \
118 BUILD_ERROR(expr,Message);\
119 m_seqExceptions.getArray()[ m_seqExceptions.getLength()-1] = Any( Exception );\