Kaydet (Commit) 771914ab authored tarafından Michael Stahl's avatar Michael Stahl

API CHANGE: remove com.sun.star.test module

The com.sun.star.test module is intended only for internal testing of
the UNO implementation and should not be part of the public API.

EXISTENCE: published key "/UCR/com/sun/star/test/TestEvent" exists only
in registry 1
EXISTENCE: published key "/UCR/com/sun/star/test/TestFactory" exists
only in registry 1
EXISTENCE: published key "/UCR/com/sun/star/test/XSimpleTest" exists
only in registry 1
EXISTENCE: published key "/UCR/com/sun/star/test/XTestListener" exists
only in registry 1
EXISTENCE: module "/UCR/com/sun/star/test/performance" with published
children exists only in registry 1
EXISTENCE: published key "/UCR/com/sun/star/test/XTest" exists only in
registry 1
EXISTENCE: module "/UCR/com/sun/star/test/bridge" with published
children exists only in registry 1

Change-Id: If9e607ef944b5b1b0a1af60cc9210fa4d8993bb4
üst 6eb7ee11
......@@ -96,9 +96,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,udkapi,udkapi/com/sun/star/script,
InvocationAdapterFactory \
JavaScript \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,udkapi,udkapi/com/sun/star/test,\
TestFactory \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,udkapi,udkapi/com/sun/star/util,\
BootstrapMacroExpander \
MacroExpander \
......@@ -505,18 +502,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,udkapi,udkapi/com/sun/star/task,\
XInteractionRequest \
XInteractionRetry \
))
$(eval $(call gb_UnoApi_add_idlfiles,udkapi,udkapi/com/sun/star/test,\
TestEvent \
XSimpleTest \
XTest \
XTestListener \
))
$(eval $(call gb_UnoApi_add_idlfiles,udkapi,udkapi/com/sun/star/test/bridge,\
XBridgeTest \
))
$(eval $(call gb_UnoApi_add_idlfiles,udkapi,udkapi/com/sun/star/test/performance,\
XPerformanceTest \
))
$(eval $(call gb_UnoApi_add_idlfiles,udkapi,udkapi/com/sun/star/uno,\
DeploymentException \
Exception \
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_test_TestEvent_idl__
#define __com_sun_star_test_TestEvent_idl__
#include <com/sun/star/lang/EventObject.idl>
module com { module sun { module star { module test {
/** This event gets delivered whenever a test event (an error, an exception,
a warning) takes place.
@deprecated
*/
published struct TestEvent: com::sun::star::lang::EventObject
{
/** contains the error/warning message
*/
string Message;
/** contains the exception notified by the <type>XTestListener</type>
method notifyException. This value is not valid for other events.
*/
any Exception;
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_test_TestFactory_idl__
#define __com_sun_star_test_TestFactory_idl__
#include <com/sun/star/lang/MultiServiceFactory.idl>
module com { module sun { module star { module test {
/** describes a factory of services with interfaces for testing purposes.
<p>It create instances that support the interface
<type scope="com::sun::star::test">XSimpleTest</type>.
<p>The services are accessed through interface, service or object
names. The name test service must begin with "test." followed by the
interface, service or object name ("test.com.sun.star.beans.XPropertySet").
@example:Java
<listing>
xTestService = TestFactory.createInstance( "com.sun.star.beans.XPropertySet" );
xTestService.test( "com.sun.star.beans.XPropertySet", myTestObject );
</listing>
@author Markus Meyer
@version 0.1
@deprecated
*/
published service TestFactory
{
service com::sun::star::lang::MultiServiceFactory;
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_test_XSimpleTest_idl__
#define __com_sun_star_test_XSimpleTest_idl__
#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/lang/IllegalArgumentException.idl>
module com { module sun { module star { module test {
/**
A simple interface to test a service or interface implementation.
*/
published interface XSimpleTest: com::sun::star::uno::XInterface
{
/**
Test the object TestObject against the test specified with TestName. This test
does not change the semantic state of the object, so it can be called on a existing
component that will used further on.
Note : This can be a strong test limitation. There are some components, that cannot
perform their full test scenario.
@param TestName the name of the test. Must be an interface, service or implementation name.
Note : The name is only used by the test component to distinguish
between test scenarios.
@param TestObject The instance to be tested.
@throws IllegalArgumentException
if the test does not support TestName or TestObject is null.
*/
void testInvariant( [in] string TestName,
[in] com::sun::star::uno::XInterface TestObject )
raises( com::sun::star::lang::IllegalArgumentException );
/**
Test the object TestObject against the test specified with TestName. This test
changes the state of the object. The object may be useless afterwards.
(e.g. a closed XOutputStream). The method in general may be called multipe times with a new
test object instance.
Note : These tests should include the testInvariant test.
Note : Each test scenario should be independent of each other, so even if a scenario
didn't pass the test, the other test can still be performed. The error messages
are cumulative.
@param TestName The name of the test. Must be an interface, service or implementation name.
Note : The name is only used by the test component to distinguish
between test scenarios.
@param TestObject The instance to be tested.
@param hTestHandle Internal test handle. Handle for first test is always 0.
Handle of next test is returned by the method.
@return Handle of the next test. -1 if this was the last test.
@throws IllegalArgumentException
if the test does not support TestName or
TestObject is null.
*/
long test( [in] string TestName,
[in] com::sun::star::uno::XInterface TestObject,
[in] long hTestHandle )
raises( com::sun::star::lang::IllegalArgumentException );
/**States if one of the last test has failed. This is cumulative.
@return true if all test have been passed successfully. false if an error has occurred.
*/
boolean testPassed();
// DOCUMENTATION MISSING FOR XSimpleTest::getErrors
sequence<string> getErrors();
// DOCUMENTATION MISSING FOR XSimpleTest::getErrorExceptions
sequence<any> getErrorExceptions();
// DOCUMENTATION MISSING FOR XSimpleTest::getWarnings
sequence<string> getWarnings();
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_test_XTest_idl__
#define __com_sun_star_test_XTest_idl__
#include <com/sun/star/uno/XInterface.idl>
#include <com/sun/star/lang/IllegalArgumentException.idl>
#include <com/sun/star/test/XTestListener.idl>
module com { module sun { module star { module test {
/**
A simple interface to test a service or interface implementation.
*/
published interface XTest: com::sun::star::uno::XInterface
{
/**
Test the object TestObject against the test specified with TestName. This test
does not change the semantic state of the object, so it can be called on a existing
component that will used further on. Note: This can be a strong test limitation.
There are some components, that cannot perform their full test scenario.
@param TestName
the name of the test. Must be an interface, service, or implementation name.
Note: The name is only used by the test component to distinguish between test
scenarios.
@param TestObject
The instance to be tested.
@throws IllegalArgumentException
if the test does not support TestName or TestObject is null.
*/
void testInvariant( [in] string TestName,
[in] com::sun::star::uno::XInterface TestObject )
raises( com::sun::star::lang::IllegalArgumentException );
/**
Test the object TestObject against the test specified with TestName.
This test changes the state of the object. The object may be useless
afterwards (e.g., a closed XOutputStream). The method in general may
be called multiple times with a new test object instance. Note: Each test
scenario should be independent of each other, so even if a scenario
didn't pass the test, the other test can still be performed.
The error messages are cumulative.
@param TestName
The name of the test. Must be an interface, service, or
implementation name. Note: The name is only used by the test component
to distinguish between test scenarios.
@param TestObject
The instance to be tested.
@param hTestHandle
Internal test handle. Handle for first test is always 0.
Handle of next test is returned by the method.
@return Handle of the next test. -1 if this was the last test.
@throws IllegalArgumentException
if the test does not support TestName or TestObject is null.
*/
long test( [in] string TestName,
[in] com::sun::star::uno::XInterface TestObject,
[in] long hTestHandle )
raises( com::sun::star::lang::IllegalArgumentException );
/**
Test the object TestObject against the test specified with TestName using
several threads. That does NOT mean that testMultiThread should implement
a test using several threads but that this test method should be designed
to be called by several threads. So for example, it has to take into consideration
that a test object state that is changed by the method can be
changed again by another thread. So it's not necessarily a mistake if an
expected state can't be confirmed after setting it. Besides that, everything
is the same as described for the test method.
If this way of testing with multiple threads is not appropriate for the
component to be tested this method should not be implemented (it should
only return -1) and a special multithread test adapted to the special
needs of testing this component should be integrated in the test method.
@param TestName
The name of the test. Must be an interface, service or
implementation name. Note: The name is only used by the test component
to distinguish between test scenarios.
@param TestObject
The instance to be tested.
@param hTestHandle
Internal test handle. Handle for first test is always 0.
Handle of next test is returned by the method.
@return Handle of the next test. -1 if this was the last test.
@throws IllegalArgumentException
if the test does not support TestName or TestObject is null.
*/
long testMultiThread( [in] string TestName,
[in] com::sun::star::uno::XInterface TestObject,
[in] long hTestHandle )
raises( com::sun::star::lang::IllegalArgumentException );
/** registers an event listener, which will be called for reporting
errors/exceptions and warnings and for protocol purpuses.
*/
void addTestListener( [in] XTestListener xListener );
/** unregisters an event listener which was registered with
<member>XTest::addTestListener()</member>.
*/
void removeTestListener( [in] XTestListener xListener );
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_test_XTestListener_idl__
#define __com_sun_star_test_XTestListener_idl__
#include <com/sun/star/lang/XEventListener.idl>
#include <com/sun/star/test/TestEvent.idl>
module com { module sun { module star { module test {
/** is used to handle errors/exceptions and warnings during tests.
*/
published interface XTestListener: com::sun::star::lang::XEventListener
{
/** gets called when an error occurs while performing an test.
If the error results from an exception, the exception
can be found in the Exception member of the TestEvent
@param evt
This property contains the <type>TestEvent</type> object that
describes the event source and error description.
*/
void notifyError( [in] com::sun::star::test::TestEvent evt );
/** gets called when an warning occurs while performing an test.
@param evt
This property contains the <type>TestEvent</type> object that
describes the event source and warning description.
*/
void notifyWarning( [in] com::sun::star::test::TestEvent evt );
/** can be called by the broadcaster to inform the listener about
the progress of the test. The listener can use this information
for example to write it into a test protocol file.
@param evt
This property contains the <type>TestEvent</type> object that
describes the protocol message.
*/
void protocol( [in] com::sun::star::test::TestEvent evt );
};
}; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_test_performance_XPerformanceTest_idl__
#define __com_sun_star_test_performance_XPerformanceTest_idl__
#include <com/sun/star/uno/XInterface.idl>
module com
{
module sun
{
module star
{
module test
{
module performance
{
/** struct of simple types to be carried
*/
published struct SimpleTypes
{
boolean Bool;
char Char;
byte Byte;
short Short;
unsigned short UShort;
long Long;
unsigned long ULong;
hyper Hyper;
unsigned hyper UHyper;
float Float;
double Double;
};
/** struct ComplexTypes adding Sequence, String, Interface, Any to SimpleTypes
*/
published struct ComplexTypes : SimpleTypes
{
sequence< long > Sequence;
string String;
com::sun::star::uno::XInterface Interface;
any Any;
};
/** A performance test object has to be implemented in a special way, that:
<ul>
<li>queryInterface() execution times remain (nearly) static</li>
<li>functions kept simple, thus there is (nearly) no execution time of the function itself</li>
<li>no dynamic data is ever returned except of createObject(), so return 0, empty strings etc.</li>
</ul>
The interface is divided into three sections:
<ul>
<li>measuring asynchron/ synchron calls</li>
<li>complex data calls with/out return value; in/out parameters</li>
<li>single data types like long, float, string etc.</li>
<li>method calls versa attribute calls</li>
<li>raising RuntimeException</li>
</ul>
*/
published interface XPerformanceTest : com::sun::star::uno::XInterface
{
[oneway] void async();
void sync();
ComplexTypes complex_in( [in] ComplexTypes aVal );
ComplexTypes complex_inout( [inout] ComplexTypes aVal );
[oneway] void complex_oneway( [in] ComplexTypes aVal );
void complex_noreturn( [in] ComplexTypes aVal );
XPerformanceTest createObject();
[attribute] long Long_attr;
[attribute] hyper Hyper_attr;
[attribute] float Float_attr;
[attribute] double Double_attr;
[attribute] string String_attr;
[attribute] com::sun::star::uno::XInterface Interface_attr;
[attribute] any Any_attr;
[attribute] sequence< com::sun::star::uno::XInterface > Sequence_attr;
[attribute] ComplexTypes Struct_attr;
long getLong();
void setLong( [in] long n );
hyper getHyper();
void setHyper( [in] hyper n );
float getFloat();
void setFloat( [in] float f );
double getDouble();
void setDouble( [in] double f );
string getString();
void setString( [in] string s );
com::sun::star::uno::XInterface getInterface();
void setInterface( [in] com::sun::star::uno::XInterface x );
any getAny();
void setAny( [in] any a );
sequence< com::sun::star::uno::XInterface > getSequence();
void setSequence( [in] sequence< com::sun::star::uno::XInterface > seq );
ComplexTypes getStruct();
void setStruct( [in] ComplexTypes c );
void raiseRuntimeException();
};
};
};
};
};
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment