Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
3c3feccb
Kaydet (Commit)
3c3feccb
authored
Kas 27, 2002
tarafından
Daniel Boelzle
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#104312# extended tests
üst
beccf65c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
17 deletions
+55
-17
TestComponent.java
testtools/com/sun/star/comp/bridge/TestComponent.java
+6
-3
bridgetest.cxx
testtools/source/bridgetest/bridgetest.cxx
+39
-12
cppobj.cxx
testtools/source/bridgetest/cppobj.cxx
+10
-2
No files found.
testtools/com/sun/star/comp/bridge/TestComponent.java
Dosyayı görüntüle @
3c3feccb
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: TestComponent.java,v $
*
* $Revision: 1.
1
$
* $Revision: 1.
2
$
*
* last change: $Author:
kr $ $Date: 2001-05-04 07:05:17
$
* last change: $Author:
dbo $ $Date: 2002-11-27 10:07:33
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -61,7 +61,6 @@
package
com
.
sun
.
star
.
comp
.
bridge
;
import
com.sun.star.comp.loader.FactoryHelper
;
import
com.sun.star.lang.XServiceInfo
;
...
...
@@ -84,6 +83,7 @@ import com.sun.star.registry.XRegistryKey;
import
com.sun.star.uno.Type
;
public
class
TestComponent
{
static
public
final
boolean
DEBUG
=
false
;
...
...
@@ -430,6 +430,9 @@ public class TestComponent {
_testElements
=
io_testElements
[
0
];
_testDataElements
=
io_testDataElements
[
0
];
io_testElements
[
0
]
=
new
TestElement
[]
{
io_testElements
[
0
][
1
],
io_testElements
[
0
][
0
]
};
return
_testDataElements
;
}
...
...
testtools/source/bridgetest/bridgetest.cxx
Dosyayı görüntüle @
3c3feccb
/**************************************************************************
#*
#* last change $Author: dbo $ $Date: 2002-1
0-29 10:48:02
$
#* $Revision: 1.
4
$
#* last change $Author: dbo $ $Date: 2002-1
1-27 10:06:09
$
#* $Revision: 1.
5
$
#*
#* $Logfile: $
#*
...
...
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <osl/diagnose.h>
#include <osl/time.h>
#include <uno/dispatcher.h>
#include <uno/mapping.hxx>
...
...
@@ -41,6 +42,9 @@ using namespace com::sun::star::test::bridge;
#define SERVICENAME "com.sun.star.test.bridge.BridgeTest"
#define IMPLNAME "com.sun.star.comp.bridge.BridgeTest"
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
#define STRING_TEST_CONSTANT "\" paco\' chorizo\\\' \"\'"
namespace
bridge_test
{
...
...
@@ -207,6 +211,7 @@ static sal_Bool performAnyTest( const Reference< XBridgeTest > &xLBT, const Test
bReturn
=
testAny
(
data
.
Short
,
xLBT
)
&&
bReturn
;
bReturn
=
testAny
(
data
.
UShort
,
xLBT
)
&&
bReturn
;
bReturn
=
testAny
(
data
.
Long
,
xLBT
)
&&
bReturn
;
bReturn
=
testAny
(
data
.
ULong
,
xLBT
)
&&
bReturn
;
bReturn
=
testAny
(
data
.
Hyper
,
xLBT
)
&&
bReturn
;
bReturn
=
testAny
(
data
.
UHyper
,
xLBT
)
&&
bReturn
;
bReturn
=
testAny
(
data
.
Float
,
xLBT
)
&&
bReturn
;
...
...
@@ -332,13 +337,16 @@ static sal_Bool performTest( const Reference<XBridgeTest > & xLBT )
sal_True
,
'@'
,
17
,
0x1234
,
0xfedc
,
0x12345678
,
0xfedcba98
,
0x123456789abcdef0
,
0xfedcba9876543210
,
(
float
)
17.0815
,
3.1415926359
,
TestEnum_LOLA
,
OUS
tring
::
createFromAscii
(
"dum dum dum ich tanz im kreis herum..."
),
xI
,
OUS
TR
(
STRING_TEST_CONSTANT
),
xI
,
Any
(
&
xI
,
::
getCppuType
(
(
const
Reference
<
XInterface
>
*
)
0
)
)
);
bRet
=
check
(
aData
.
Any
==
xI
,
"### unexpected any!"
)
&&
bRet
;
bRet
=
check
(
!
(
aData
.
Any
!=
xI
),
"### unexpected any!"
)
&&
bRet
;
aData
.
Sequence
=
Sequence
<
TestElement
>
(
(
const
TestElement
*
)
&
aData
,
1
);
aData
.
Sequence
.
realloc
(
2
);
aData
.
Sequence
[
0
]
=
*
(
const
TestElement
*
)
&
aData
;
// aData.Sequence[ 1 ] is empty
// aData complete
//================================================================================
...
...
@@ -351,7 +359,9 @@ static sal_Bool performTest( const Reference<XBridgeTest > & xLBT )
aData
.
Enum
,
aData
.
String
,
xI
,
Any
(
&
xI
,
::
getCppuType
(
(
const
Reference
<
XInterface
>
*
)
0
)
)
);
aSetData
.
Sequence
=
Sequence
<
TestElement
>
(
(
const
TestElement
*
)
&
aSetData
,
1
);
aSetData
.
Sequence
.
realloc
(
2
);
aSetData
.
Sequence
[
0
]
=
*
(
const
TestElement
*
)
&
aSetData
;
// aSetData.Sequence[ 1 ] is empty
xLBT
->
setValues
(
aSetData
.
Bool
,
aSetData
.
Char
,
aSetData
.
Byte
,
aSetData
.
Short
,
aSetData
.
UShort
,
...
...
@@ -373,7 +383,13 @@ static sal_Bool performTest( const Reference<XBridgeTest > & xLBT )
aRet
.
Long
,
aRet
.
ULong
,
aRet
.
Hyper
,
aRet
.
UHyper
,
aRet
.
Float
,
aRet
.
Double
,
aRet
.
Enum
,
aRet
.
String
,
aRet
.
Interface
,
aRet
.
Any
,
aRet
.
Sequence
,
aRet2
);
bRet
=
check
(
equals
(
aData
,
aSV2ret
)
&&
equals
(
aData
,
aRet2
)
,
"getValues2 test"
)
&&
bRet
;
bRet
=
check
(
equals
(
aData
,
aSV2ret
)
&&
equals
(
aData
,
aRet2
)
,
"getValues2 test"
)
&&
bRet
;
// check inout sequence order => inout sequence parameter was switched by test objects
bRet
=
check
(
equals
(
aRet
.
Sequence
[
0
],
aData
.
Sequence
[
1
]
)
&&
equals
(
aRet
.
Sequence
[
1
],
aData
.
Sequence
[
0
]
),
"sequence order test"
);
}
{
TestData
aRet
,
aRet2
;
...
...
@@ -442,7 +458,7 @@ static sal_Bool performTest( const Reference<XBridgeTest > & xLBT )
static
sal_Bool
raiseOnewayException
(
const
Reference
<
XBridgeTest
>
&
xLBT
)
{
sal_Bool
bReturn
=
sal_True
;
OUString
sCompare
=
OUS
tring
(
RTL_CONSTASCII_USTRINGPARAM
(
"dum dum dum ich tanz im kreis herum..."
)
);
OUString
sCompare
=
OUS
TR
(
STRING_TEST_CONSTANT
);
try
{
// Note : the exception may fly or not (e.g. remote scenario).
...
...
@@ -468,14 +484,14 @@ static sal_Bool raiseException( const Reference< XBridgeTest > & xLBT )
{
TestData
aRet
,
aRet2
;
xLBT
->
raiseException
(
5
,
OUS
tring
(
RTL_CONSTASCII_USTRINGPARAM
(
"dum dum dum ich tanz im kreis herum..."
)
),
5
,
OUS
TR
(
STRING_TEST_CONSTANT
),
xLBT
->
getInterface
()
);
}
catch
(
IllegalArgumentException
aExc
)
{
if
(
aExc
.
ArgumentPosition
==
5
&&
aExc
.
Context
==
xLBT
->
getInterface
()
&&
aExc
.
Message
.
compareToAscii
(
"dum dum dum ich tanz im kreis herum..."
)
==
0
)
aExc
.
Message
.
compareToAscii
(
STRING_TEST_CONSTANT
)
==
0
)
{
++
nCount
;
}
...
...
@@ -491,7 +507,7 @@ static sal_Bool raiseException( const Reference< XBridgeTest > & xLBT )
catch
(
const
RuntimeException
&
rExc
)
{
if
(
rExc
.
Context
==
xLBT
->
getInterface
()
&&
rExc
.
Message
.
compareToAscii
(
"dum dum dum ich tanz im kreis herum..."
)
==
0
)
rExc
.
Message
.
compareToAscii
(
STRING_TEST_CONSTANT
)
==
0
)
{
++
nCount
;
}
...
...
@@ -507,7 +523,7 @@ static sal_Bool raiseException( const Reference< XBridgeTest > & xLBT )
catch
(
Exception
&
rExc
)
{
if
(
rExc
.
Context
==
xLBT
->
getInterface
()
&&
rExc
.
Message
.
compareToAscii
(
"dum dum dum ich tanz im kreis herum..."
)
==
0
)
rExc
.
Message
.
compareToAscii
(
STRING_TEST_CONSTANT
)
==
0
)
{
++
nCount
;
}
...
...
@@ -598,11 +614,19 @@ sal_Int32 TestBridgeImpl::run( const Sequence< OUString > & rArgs )
}
Reference
<
XBridgeTest
>
xLBT
;
sal_Bool
bRet
=
check
(
makeSurrogate
(
xLBT
,
xTest
),
"makeSurrogate"
);
sal_Bool
bRet
;
bRet
=
check
(
makeSurrogate
(
xLBT
,
xTest
),
"makeSurrogate"
);
bRet
=
check
(
performTest
(
xLBT
),
"standard test"
)
&&
bRet
;
bRet
=
check
(
raiseException
(
xLBT
)
,
"exception test"
)
&&
bRet
;
bRet
=
check
(
raiseOnewayException
(
xLBT
),
"oneway exception test"
)
&&
bRet
;
bRet
=
performQueryForUnknownType
(
xLBT
)
&&
bRet
;
if
(
!
bRet
)
{
throw
RuntimeException
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"error: test failed!"
)
),
Reference
<
XInterface
>
()
);
}
if
(
bRet
)
{
printf
(
"> dynamic invocation test succeeded!
\n
"
);
...
...
@@ -717,6 +741,9 @@ void * SAL_CALL component_getFactory(
/**************************************************************************
$Log: not supported by cvs2svn $
Revision 1.4 2002/10/29 10:48:02 dbo
#104312# minor fixes
Revision 1.3 2002/09/17 15:08:40 jbu
#98508# added bridgetest_javaserver batch, tests work now also in .pro builds
...
...
testtools/source/bridgetest/cppobj.cxx
Dosyayı görüntüle @
3c3feccb
/**************************************************************************
#*
#* last change $Author:
kr $ $Date: 2001-05-04 07:05:17
$
#* $Revision: 1.
1
$
#* last change $Author:
dbo $ $Date: 2002-11-27 10:06:09
$
#* $Revision: 1.
2
$
#*
#* $Logfile: $
#*
...
...
@@ -349,6 +349,11 @@ TestData Test_Impl::setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& n
bBool
,
cChar
,
nByte
,
nShort
,
nUShort
,
nLong
,
nULong
,
nHyper
,
nUHyper
,
fFloat
,
fDouble
,
eEnum
,
rStr
,
xTest
,
rAny
,
rSequence
);
_aStructData
=
rStruct
;
TestElement
elem
=
rSequence
[
0
];
rSequence
[
0
]
=
rSequence
[
1
];
rSequence
[
1
]
=
elem
;
return
_aStructData
;
}
//__________________________________________________________________________________________________
...
...
@@ -516,6 +521,9 @@ void * SAL_CALL component_getFactory(
/**************************************************************************
$Log: not supported by cvs2svn $
Revision 1.1 2001/05/04 07:05:17 kr
moved from grande to openoffice
Revision 1.5 2001/03/14 09:55:11 jl
#include <osl/time.h> added
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment