summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 13:36:51 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 13:36:51 +1000
commitfbf171d1adf3e260f6a93217e82a1b74cc4f670c (patch)
tree61d54716ca4cf9afc9b45b8e0151903293ec654b
parentf1ac23866db030bd4489ab79a7e2e669070b9dab (diff)
tdf#43157: convert extensions module away from OSL_ASSERT to assert
Change-Id: Ib0de4a05ca14af4e5760d36bf56eab23995daa5b
-rw-r--r--extensions/source/config/ldap/ldapaccess.cxx2
-rw-r--r--extensions/source/config/ldap/ldapuserprofilebe.cxx2
-rw-r--r--extensions/source/ole/oleobjw.cxx24
-rw-r--r--extensions/source/ole/unoobjw.cxx8
-rw-r--r--extensions/source/ole/unotypewrapper.cxx4
-rw-r--r--extensions/source/update/check/download.cxx8
-rw-r--r--extensions/source/update/check/updatecheck.cxx10
-rw-r--r--extensions/source/update/check/updatecheckconfig.cxx2
-rw-r--r--extensions/source/update/check/updatehdl.cxx2
-rw-r--r--extensions/source/update/check/updateprotocol.cxx2
-rw-r--r--extensions/source/update/feed/updatefeed.cxx12
-rw-r--r--extensions/test/ole/OleClient/funcs.cxx2
-rw-r--r--extensions/workben/pythonautotest.cxx72
-rw-r--r--extensions/workben/pythontest.cxx2
-rw-r--r--extensions/workben/testcomponent.cxx2
15 files changed, 77 insertions, 77 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index 5d2982315f25..0b94c9bf7751 100644
--- a/extensions/source/config/ldap/ldapaccess.cxx
+++ b/extensions/source/config/ldap/ldapaccess.cxx
@@ -170,7 +170,7 @@ void LdapConnection::initConnection()
void LdapConnection::getUserProfile(
const OUString& aUser, LdapData * data)
{
- OSL_ASSERT(data != nullptr);
+ assert(data != nullptr);
if (!isValid()) { connectSimple(); }
OUString aUserDn =findUserDn( aUser );
diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx
index 54d60e335c50..1c1374b32451 100644
--- a/extensions/source/config/ldap/ldapuserprofilebe.cxx
+++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx
@@ -90,7 +90,7 @@ bool LdapUserProfileBe::readLdapConfiguration(
css::uno::Reference< css::uno::XComponentContext > const & context,
LdapDefinition * definition, OUString * loggedOnUser)
{
- OSL_ASSERT(context.is() && definition != nullptr && loggedOnUser != nullptr);
+ assert(context.is() && definition != nullptr && loggedOnUser != nullptr);
const OUString kReadOnlyViewService("com.sun.star.configuration.ConfigurationAccess") ;
const OUString kComponent("org.openoffice.LDAP/UserDirectory");
const OUString kServerDefiniton("ServerDefinition");
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index 43fc37670a53..d88b5c077622 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -111,7 +111,7 @@ IUnknownWrapper_Impl::~IUnknownWrapper_Impl()
XInterface * xIntRoot = static_cast<OWeakObject *>(this);
#if OSL_DEBUG_LEVEL > 0
acquire(); // make sure we don't delete us twice because of Reference
- OSL_ASSERT( Reference<XInterface>( static_cast<XWeak*>(this), UNO_QUERY).get() == xIntRoot );
+ assert( Reference<XInterface>( static_cast<XWeak*>(this), UNO_QUERY).get() == xIntRoot );
#endif
// remove entries in global maps
@@ -324,7 +324,7 @@ void SAL_CALL IUnknownWrapper_Impl::setValue( const OUString& aPropertyName,
dispparams.cNamedArgs = 1;
dispparams.rgvarg = & varArg;
- OSL_ASSERT(aDescPut || aVarDesc);
+ assert(aDescPut || aVarDesc);
VARTYPE vt = 0;
DISPID dispid = 0;
@@ -506,7 +506,7 @@ Any SAL_CALL IUnknownWrapper_Impl::getValue( const OUString& aPropertyName )
throw UnknownPropertyException(msg);
}
// write-only should not be possible
- OSL_ASSERT( aDescGet || ! aDescPut);
+ assert( aDescGet || ! aDescPut);
HRESULT hr;
DISPPARAMS dispparams = {nullptr, nullptr, 0, 0};
@@ -999,7 +999,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName,
{
//We should not run into this block, because invokeWithDispIdComTlb should
//have been called instead.
- OSL_ASSERT(false);
+ assert(false);
}
@@ -1171,7 +1171,7 @@ void SAL_CALL IUnknownWrapper_Impl::initialize( const Sequence< Any >& aArgument
// 2.parameter is a boolean which indicates if the COM pointer was a IUnknown or IDispatch
// 3.parameter is a Sequence<Type>
o2u_attachCurrentThread();
- OSL_ASSERT(aArguments.getLength() == 3);
+ assert(aArguments.getLength() == 3);
m_spUnknown= *static_cast<IUnknown* const *>(aArguments[0].getValue());
m_spUnknown.QueryInterface( & m_spDispatch.p);
@@ -1898,7 +1898,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
{
//optional arg
//e.g: call func(x) in basic : func() ' no arg supplied
- OSL_ASSERT(paramFlags & PARAMFLAG_FOPT);
+ assert(paramFlags & PARAMFLAG_FOPT);
arRefArgs[revIndex].vt = VT_ERROR;
arRefArgs[revIndex].scode = DISP_E_PARAMNOTFOUND;
}
@@ -2171,7 +2171,7 @@ void IUnknownWrapper_Impl::getFuncDescForInvoke(const OUString & sFuncName,
}
bool IUnknownWrapper_Impl::getDispid(const OUString& sFuncName, DISPID * id)
{
- OSL_ASSERT(m_spDispatch);
+ assert(m_spDispatch);
LPOLESTR lpsz = const_cast<LPOLESTR> (reinterpret_cast<LPCOLESTR>(sFuncName.getStr()));
HRESULT hr = m_spDispatch->GetIDsOfNames(IID_NULL, &lpsz, 1, LOCALE_USER_DEFAULT, id);
return hr == S_OK;
@@ -2179,7 +2179,7 @@ bool IUnknownWrapper_Impl::getDispid(const OUString& sFuncName, DISPID * id)
void IUnknownWrapper_Impl::getFuncDesc(const OUString & sFuncName, FUNCDESC ** pFuncDesc)
{
- OSL_ASSERT( * pFuncDesc == nullptr);
+ assert( * pFuncDesc == nullptr);
buildComTlbIndex();
typedef TLBFuncIndexMap::const_iterator cit;
//We assume there is only one entry with the function name. A property
@@ -2201,7 +2201,7 @@ void IUnknownWrapper_Impl::getFuncDesc(const OUString & sFuncName, FUNCDESC ** p
//the actual name as obtained from ITypeInfo
OUString sRealName(reinterpret_cast<const sal_Unicode*>(LPCOLESTR(memberName)));
cit itOrg = m_mapComFunc.find(sRealName);
- OSL_ASSERT(itOrg != m_mapComFunc.end());
+ assert(itOrg != m_mapComFunc.end());
// maybe this is a property, if so we need
// to store either both id's ( put/get ) or
// just the get. Storing both is more consistent
@@ -2220,7 +2220,7 @@ void IUnknownWrapper_Impl::getFuncDesc(const OUString & sFuncName, FUNCDESC ** p
pair<cit, cit> p = m_mapComFunc.equal_range(sFuncName.toAsciiLowerCase());
int numEntries = 0;
for ( ;p.first != p.second; p.first ++, numEntries ++);
- OSL_ASSERT( ! (numEntries > 3) );
+ assert( ! (numEntries > 3) );
#endif
if( itIndex != m_mapComFunc.end())
{
@@ -2249,7 +2249,7 @@ void IUnknownWrapper_Impl::getFuncDesc(const OUString & sFuncName, FUNCDESC ** p
void IUnknownWrapper_Impl::getPropDesc(const OUString & sFuncName, FUNCDESC ** pFuncDescGet,
FUNCDESC** pFuncDescPut, VARDESC** pVarDesc)
{
- OSL_ASSERT( * pFuncDescGet == nullptr && * pFuncDescPut == nullptr);
+ assert( * pFuncDescGet == nullptr && * pFuncDescPut == nullptr);
buildComTlbIndex();
typedef TLBFuncIndexMap::const_iterator cit;
pair<cit, cit> p = m_mapComFunc.equal_range(sFuncName);
@@ -2275,7 +2275,7 @@ void IUnknownWrapper_Impl::getPropDesc(const OUString & sFuncName, FUNCDESC ** p
for ( int i = 0 ;p.first != p.second; p.first ++, i ++)
{
// There are a maximum of two entries, property put and property get
- OSL_ASSERT( ! (i > 2) );
+ assert( ! (i > 2) );
ITypeInfo* pType= getTypeInfo();
FUNCDESC * pFuncDesc = nullptr;
if (SUCCEEDED( pType->GetFuncDesc(p.first->second, & pFuncDesc)))
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index db6398364656..6f2f20725d7a 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -273,15 +273,15 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetIDsOfNames(REFIID /*riid*/,
}
catch(const BridgeRuntimeError&)
{
- OSL_ASSERT(false);
+ assert(false);
}
catch(const Exception&)
{
- OSL_ASSERT(false);
+ assert(false);
}
catch(...)
{
- OSL_ASSERT(false);
+ assert(false);
}
return ret;
@@ -400,7 +400,7 @@ void InterfaceOleWrapper_Impl::convertDispparamsArgs(DISPID id,
else if(info.eMemberType == MemberType_PROPERTY)
variantToAny( & varParam, anyParam, info.aType);
else
- OSL_ASSERT(false);
+ assert(false);
pParams[countArgs - (i + 1)]= anyParam;
}// end for / iterating over all parameters
diff --git a/extensions/source/ole/unotypewrapper.cxx b/extensions/source/ole/unotypewrapper.cxx
index ef576a11aaa4..bf511432e81f 100644
--- a/extensions/source/ole/unotypewrapper.cxx
+++ b/extensions/source/ole/unotypewrapper.cxx
@@ -25,7 +25,7 @@
bool createUnoTypeWrapper(BSTR sTypeName, VARIANT * pVar)
{
bool ret = false;
- OSL_ASSERT(sTypeName && pVar);
+ assert(sTypeName && pVar);
CComObject< UnoTypeWrapper>* pObj;
VariantClear(pVar);
if( SUCCEEDED( CComObject<UnoTypeWrapper>::CreateInstance( &pObj)))
@@ -35,7 +35,7 @@ bool createUnoTypeWrapper(BSTR sTypeName, VARIANT * pVar)
pVar->pdispVal= CComQIPtr<IDispatch>(pObj->GetUnknown());
//now set the value, e.i. the name of the type
CComQIPtr<IUnoTypeWrapper> spType(pVar->pdispVal);
- OSL_ASSERT(spType);
+ assert(spType);
if (SUCCEEDED(spType->put_Name(sTypeName)))
{
ret = true;
diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx
index 4b4afea5523d..97f4e372c522 100644
--- a/extensions/source/update/check/download.cxx
+++ b/extensions/source/update/check/download.cxx
@@ -104,7 +104,7 @@ static void openFile( OutData& out )
static inline OString
getStringValue(const uno::Reference< container::XNameAccess >& xNameAccess, const OUString& aName)
{
- OSL_ASSERT(xNameAccess->hasByName(aName));
+ assert(xNameAccess->hasByName(aName));
uno::Any aValue = xNameAccess->getByName(aName);
return OUStringToOString(aValue.get<OUString>(), RTL_TEXTENCODING_UTF8);
@@ -115,7 +115,7 @@ static inline sal_Int32
getInt32Value(const uno::Reference< container::XNameAccess >& xNameAccess,
const OUString& aName)
{
- OSL_ASSERT(xNameAccess->hasByName(aName));
+ assert(xNameAccess->hasByName(aName));
uno::Any aValue = xNameAccess->getByName(aName);
sal_Int32 n = -1;
@@ -191,7 +191,7 @@ Download::getProxyForURL(const OUString& rURL, OString& rHost, sal_Int32& rPort)
"com.sun.star.configuration.ConfigurationAccess", aArgumentList ),
uno::UNO_QUERY_THROW );
- OSL_ASSERT(xNameAccess->hasByName("ooInetProxyType"));
+ assert(xNameAccess->hasByName("ooInetProxyType"));
uno::Any aValue = xNameAccess->getByName("ooInetProxyType");
sal_Int32 nProxyType = aValue.get< sal_Int32 >();
@@ -336,7 +336,7 @@ bool curl_run(const OUString& rURL, OutData& out, const OString& aProxyHost, sal
bool
Download::start(const OUString& rURL, const OUString& rFile, const OUString& rDestinationDir)
{
- OSL_ASSERT( m_aHandler.is() );
+ assert( m_aHandler.is() );
OutData out(m_aCondition);
OUString aFile( rFile );
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 0538f40403aa..2aa4da72b3ad 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -991,7 +991,7 @@ UpdateCheck::enableAutoCheck(bool enable)
void
UpdateCheck::enableDownload(bool enable, bool paused)
{
- OSL_ASSERT(nullptr == m_pThread);
+ assert(nullptr == m_pThread);
State eState = DISABLED;
if( enable )
@@ -1198,7 +1198,7 @@ UpdateCheck::showDialog(bool forceCheck)
break;
case NOT_INITIALIZED:
- OSL_ASSERT( false );
+ assert( false );
break;
}
@@ -1233,7 +1233,7 @@ UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo)
bool bSuppressBubble = aInfo.BuildId.equals(m_aUpdateInfo.BuildId);
m_aUpdateInfo = aInfo;
- OSL_ASSERT(DISABLED == m_eState || CHECK_SCHEDULED == m_eState);
+ assert(DISABLED == m_eState || CHECK_SCHEDULED == m_eState);
// Ignore leading non direct download if we get direct ones
std::vector< DownloadSource >::iterator iter = m_aUpdateInfo.Sources.begin();
@@ -1253,7 +1253,7 @@ UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo)
}
rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext, *this);
- OSL_ASSERT( rModel.is() );
+ assert( rModel.is() );
// Decide whether to use alternate release note pos ..
bool autoDownloadEnabled = rModel->isAutoDownloadEnabled();
@@ -1368,7 +1368,7 @@ void UpdateCheck::setUIState(UpdateState eState, bool suppressBubble)
m_eUpdateState = eState;
rtl::Reference<UpdateHandler> aUpdateHandler(getUpdateHandler());
- OSL_ASSERT( aUpdateHandler.is() );
+ assert( aUpdateHandler.is() );
UpdateInfo aUpdateInfo(m_aUpdateInfo);
OUString aImageName(m_aImageName);
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index e61f7edc3e63..d6bbb033ecdc 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -422,7 +422,7 @@ UpdateCheckConfig::clearUpdateFound()
m_xContainer->removeByName(aName);
} catch(const lang::WrappedTargetException& ) {
// Can not remove value, probably in share layer
- OSL_ASSERT(false);
+ assert(false);
m_xContainer->replaceByName(aName, uno::makeAny(OUString()));
}
}
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 13ba54392c0f..4e0be50fb5f6 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -1040,7 +1040,7 @@ void UpdateHandler::createDialog()
{
if ( !mxContext.is() )
{
- OSL_ASSERT( false );
+ assert( false );
return;
}
diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx
index 93c6508e42f1..905d05723401 100644
--- a/extensions/source/update/check/updateprotocol.cxx
+++ b/extensions/source/update/check/updateprotocol.cxx
@@ -114,7 +114,7 @@ checkForUpdates(
if( !rxContext.is() )
throw uno::RuntimeException( "checkForUpdates: empty component context" );
- OSL_ASSERT( rxContext->getServiceManager().is() );
+ assert( rxContext->getServiceManager().is() );
// XPath implementation
uno::Reference< xml::xpath::XXPathAPI > xXPath = xml::xpath::XPathAPI::create(rxContext);
diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx
index 28c092c76a81..e3fdaf38936e 100644
--- a/extensions/source/update/feed/updatefeed.cxx
+++ b/extensions/source/update/feed/updatefeed.cxx
@@ -224,8 +224,8 @@ public:
sal_Bool SAL_CALL hasMoreElements() override { return m_nCount < m_nNodes; };
uno::Any SAL_CALL nextElement() override
{
- OSL_ASSERT( m_xNodeList.is() );
- OSL_ASSERT( m_xUpdateInformationProvider.is() );
+ assert( m_xNodeList.is() );
+ assert( m_xUpdateInformationProvider.is() );
if( !(m_nCount < m_nNodes ) )
throw container::NoSuchElementException(OUString::number(m_nCount), *this);
@@ -516,7 +516,7 @@ UpdateInformationProvider::load(const OUString& rURL)
uno::Reference< xml::dom::XElement >
UpdateInformationProvider::getDocumentRoot(const uno::Reference< xml::dom::XNode >& rxNode)
{
- OSL_ASSERT(m_xDocumentBuilder.is());
+ assert(m_xDocumentBuilder.is());
uno::Reference< xml::dom::XElement > xElement(rxNode, uno::UNO_QUERY_THROW);
@@ -526,7 +526,7 @@ UpdateInformationProvider::getDocumentRoot(const uno::Reference< xml::dom::XNode
uno::Reference< xml::dom::XDocument > xUpdateXML =
m_xDocumentBuilder->parse(load(xElement->getAttribute( "src" )));
- OSL_ASSERT( xUpdateXML.is() );
+ assert( xUpdateXML.is() );
if( xUpdateXML.is() )
return xUpdateXML->getDocumentElement();
@@ -561,7 +561,7 @@ uno::Reference< xml::dom::XNode >
UpdateInformationProvider::getChildNode(const uno::Reference< xml::dom::XNode >& rxNode,
const OUString& rName)
{
- OSL_ASSERT(m_xXPathAPI.is());
+ assert(m_xXPathAPI.is());
try {
return m_xXPathAPI->selectSingleNode(rxNode, "./atom:" + rName);
} catch (const xml::xpath::XPathException &) {
@@ -577,7 +577,7 @@ UpdateInformationProvider::getUpdateInformationEnumeration(
OUString const & extensionId
)
{
- OSL_ASSERT(m_xDocumentBuilder.is());
+ assert(m_xDocumentBuilder.is());
// reset cancelled flag
m_bCancelled.reset();
diff --git a/extensions/test/ole/OleClient/funcs.cxx b/extensions/test/ole/OleClient/funcs.cxx
index 8070b085a608..d3f3dc5d28d2 100644
--- a/extensions/test/ole/OleClient/funcs.cxx
+++ b/extensions/test/ole/OleClient/funcs.cxx
@@ -163,7 +163,7 @@ bool equalSequences(const Any& orig, const Any& returned)
{
if (orig.getValueTypeClass() != TypeClass_SEQUENCE)
{
- OSL_ASSERT(0);
+ assert(0);
return false;
}
TypeDescription td(orig.getValueTypeRef());
diff --git a/extensions/workben/pythonautotest.cxx b/extensions/workben/pythonautotest.cxx
index e4804608bf5e..f80ca28306e1 100644
--- a/extensions/workben/pythonautotest.cxx
+++ b/extensions/workben/pythonautotest.cxx
@@ -279,7 +279,7 @@ void TestListener::cmdLine()
void TestListener::detach()
{
- OSL_ASSERT( m_pDebuggingRef );
+ assert( m_pDebuggingRef );
m_pDebuggingRef = 0;
}
@@ -299,15 +299,15 @@ void checkInvokation( const XInvokationRef &xInvoke )
UsrAny anyList;
// check exporting an object as an invokation
- OSL_ASSERT( xInvoke->hasProperty( L"list" ) );
+ assert( xInvoke->hasProperty( L"list" ) );
anyList = xInvoke->getValue( L"list" );
- OSL_ASSERT( anyList.getReflection() == XInvokation_getReflection() );
+ assert( anyList.getReflection() == XInvokation_getReflection() );
XInvokationRef *pRef = ( XInvokationRef * ) anyList.get();
- OSL_ASSERT( (*pRef).is() );
+ assert( (*pRef).is() );
- OSL_ASSERT( (*pRef)->hasMethod( L"append" ) );
- OSL_ASSERT( (*pRef)->hasMethod( L"count" ) );
+ assert( (*pRef)->hasMethod( L"append" ) );
+ assert( (*pRef)->hasMethod( L"count" ) );
Sequence<UsrAny> seq(1);
UsrAny any( (INT32) 1);
@@ -319,7 +319,7 @@ void checkInvokation( const XInvokationRef &xInvoke )
any = (*pRef)->invoke( L"append" , seq , Sequence<INT16>(), Sequence<UsrAny>() );
any = (*pRef)->invoke( L"count" , seq , Sequence<INT16>(), Sequence<UsrAny>() );
- OSL_ASSERT( nOldSize + 1 == any.getINT32() );
+ assert( nOldSize + 1 == any.getINT32() );
}
// just for testing !
@@ -424,30 +424,30 @@ int SAL_CALL main (int argc, char **argv)
*****/
// get/set an int !
{
- OSL_ASSERT( xInvoke->hasProperty( L"nIntTest" ) );
+ assert( xInvoke->hasProperty( L"nIntTest" ) );
UsrAny any = xInvoke->getValue( L"nIntTest" );
- OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_LONG );
- OSL_ASSERT( any.getINT32() == 5 );
+ assert( any.getReflection()->getTypeClass() == TypeClass_LONG );
+ assert( any.getINT32() == 5 );
// simple test: set an int !
xInvoke->setValue( L"nIntTest" , UsrAny( (INT32) 10 ) );
any = xInvoke->getValue( L"nIntTest" );
- OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_LONG );
- OSL_ASSERT( any.getINT32() == 10 );
+ assert( any.getReflection()->getTypeClass() == TypeClass_LONG );
+ assert( any.getINT32() == 10 );
}
// call a python method !
{
xEngine->run( L"def foo():\n"
L" return 'this is foo'\n" , XInterfaceRef() , Sequence<UsrAny> () );
- OSL_ASSERT( xInvoke->hasMethod( L"foo" ) );
+ assert( xInvoke->hasMethod( L"foo" ) );
UsrAny any = xInvoke->invoke( L"foo" ,
Sequence<UsrAny>(),
Sequence<INT16>() ,
Sequence<UsrAny> () );
- OSL_ASSERT( any.getString() == L"this is foo" );
+ assert( any.getString() == L"this is foo" );
}
@@ -456,7 +456,7 @@ int SAL_CALL main (int argc, char **argv)
try {
xInvoke->invoke( L"foo" , Sequence<UsrAny>(1) , Sequence<INT16>(), Sequence<UsrAny> () );
// wrong number of arguments
- OSL_ASSERT( 0 );
+ assert( 0 );
}
catch ( IllegalArgumentException& e ) {
}
@@ -477,21 +477,21 @@ int SAL_CALL main (int argc, char **argv)
*******/
{
XIntrospectionAccessRef xIntrospection = xInvoke->getIntrospection();
- OSL_ASSERT( xIntrospection.is() );
+ assert( xIntrospection.is() );
// no further test, simply call them
xIntrospection->getMethods(0);
xIntrospection->getProperties(0);
- OSL_ASSERT( xIntrospection->getSuppliedMethodConcepts() == 0 );
- OSL_ASSERT( xIntrospection->getSuppliedPropertyConcepts() == 0 );
+ assert( xIntrospection->getSuppliedMethodConcepts() == 0 );
+ assert( xIntrospection->getSuppliedPropertyConcepts() == 0 );
Property prop = xIntrospection->getProperty( L"nIntTest" ,0 );
- OSL_ASSERT( prop.Name == L"nIntTest" );
- OSL_ASSERT( prop.Type->getTypeClass() == TypeClass_LONG );
+ assert( prop.Name == L"nIntTest" );
+ assert( prop.Type->getTypeClass() == TypeClass_LONG );
XIdlMethodRef method = xIntrospection->getMethod( L"foo" , 0 );
- OSL_ASSERT( method->getName() == L"foo" );
+ assert( method->getName() == L"foo" );
}
@@ -543,8 +543,8 @@ int SAL_CALL main (int argc, char **argv)
xEngine->run( L"import testmodul\n"
L"x = testmodul.testmethod()\n" , XInterfaceRef() , Sequence<UsrAny>() );
UsrAny any = xInvoke->getValue( L"x" );
- OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_LONG );
- OSL_ASSERT( any.getINT32() == 42 );
+ assert( any.getReflection()->getTypeClass() == TypeClass_LONG );
+ assert( any.getINT32() == 42 );
}
// check other imports
@@ -553,11 +553,11 @@ int SAL_CALL main (int argc, char **argv)
xEngine->run( L"import math\n"
L"dMathTest = math.exp(0)\n" , XInterfaceRef() , Sequence<UsrAny> () );
- OSL_ASSERT( xInvoke->hasProperty( L"dMathTest" ) );
+ assert( xInvoke->hasProperty( L"dMathTest" ) );
UsrAny any = xInvoke->getValue( L"dMathTest" );
- OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_DOUBLE );
- OSL_ASSERT( any.getDouble() == 1. );
+ assert( any.getReflection()->getTypeClass() == TypeClass_DOUBLE );
+ assert( any.getDouble() == 1. );
}
// Test connection to root object !
@@ -568,36 +568,36 @@ int SAL_CALL main (int argc, char **argv)
L"z = y.value\n" , XInterfaceRef() , Sequence<UsrAny> () );
UsrAny any = xInvoke->getValue( L"x" );
- OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_LONG );
- OSL_ASSERT( any.getINT32() == 15 );
+ assert( any.getReflection()->getTypeClass() == TypeClass_LONG );
+ assert( any.getINT32() == 15 );
any = xInvoke->getValue( L"z" );
- OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_LONG );
- OSL_ASSERT( any.getINT32() == 15 );
+ assert( any.getReflection()->getTypeClass() == TypeClass_LONG );
+ assert( any.getINT32() == 15 );
}
// Test exactName interface
{
UsrAny any = xInvoke->getValue( L"__builtins__" );
- OSL_ASSERT( any.getReflection()->getTypeClass() == TypeClass_INTERFACE );
+ assert( any.getReflection()->getTypeClass() == TypeClass_INTERFACE );
XInvokationRef rInv( *((XInterfaceRef *) any.get() ), USR_QUERY );
- OSL_ASSERT( rInv.is() );
+ assert( rInv.is() );
XExactNameRef rName( *((XInterfaceRef*) any.get() ), USR_QUERY );
- OSL_ASSERT( rName.is() );
+ assert( rName.is() );
UString str = rName->getExactName( L"SYNTAXERROR" );
- OSL_ASSERT( str.len() );
+ assert( str.len() );
}
// Test exactName interface of the engine itself
{
XExactNameRef rName( xInvoke , USR_QUERY );
- OSL_ASSERT( rName.is() );
+ assert( rName.is() );
UString str = rName->getExactName( L"STARDIV" );
- OSL_ASSERT( str.len() );
+ assert( str.len() );
}
diff --git a/extensions/workben/pythontest.cxx b/extensions/workben/pythontest.cxx
index b7174dbe12ab..c12d83ee40fd 100644
--- a/extensions/workben/pythontest.cxx
+++ b/extensions/workben/pythontest.cxx
@@ -433,7 +433,7 @@ void CmdDebugger::dumpVarToStream( const char *pc , const UsrAny &aValue, FILE *
void CmdDebugger::detach()
{
- OSL_ASSERT( m_pDebuggingRef );
+ assert( m_pDebuggingRef );
m_bIsRunning = FALSE;
m_pDebuggingRef = 0;
diff --git a/extensions/workben/testcomponent.cxx b/extensions/workben/testcomponent.cxx
index e9bed4c909b4..b62c045843e3 100644
--- a/extensions/workben/testcomponent.cxx
+++ b/extensions/workben/testcomponent.cxx
@@ -62,7 +62,7 @@ int SAL_CALL main (int argc, char **argv)
// create service manager
// XMultiServiceFactoryRef xSMgr = getProcessServiceManager();
XMultiServiceFactoryRef xSMgr = createRegistryServiceManager();
- OSL_ASSERT( xSMgr.is() );
+ assert( xSMgr.is() );
registerUsrServices( xSMgr );
setProcessServiceManager( xSMgr );