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
52da3422
Kaydet (Commit)
52da3422
authored
Eki 08, 2009
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#i105680# add struct returning bridge tests and run them during the build
üst
d5c2cf42
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
123 additions
and
9 deletions
+123
-9
TestComponent.java
testtools/com/sun/star/comp/bridge/TestComponent.java
+21
-0
bridgetest.cxx
testtools/source/bridgetest/bridgetest.cxx
+22
-0
cppobj.cxx
testtools/source/bridgetest/cppobj.cxx
+9
-0
bridgetest.idl
testtools/source/bridgetest/idl/bridgetest.idl
+62
-0
makefile.mk
testtools/source/bridgetest/makefile.mk
+6
-3
makefile.mk
testtools/source/bridgetest/pyuno/makefile.mk
+3
-6
No files found.
testtools/com/sun/star/comp/bridge/TestComponent.java
Dosyayı görüntüle @
52da3422
...
...
@@ -47,12 +47,17 @@ import test.testtools.bridgetest.TestEnum;
import
test.testtools.bridgetest.TestPolyStruct
;
import
test.testtools.bridgetest.TestPolyStruct2
;
import
test.testtools.bridgetest.TestStruct
;
import
test.testtools.bridgetest.SmallStruct
;
import
test.testtools.bridgetest.MediumStruct
;
import
test.testtools.bridgetest.BigStruct
;
import
test.testtools.bridgetest.AllFloats
;
import
test.testtools.bridgetest.XBridgeTest
;
import
test.testtools.bridgetest.XBridgeTest2
;
import
test.testtools.bridgetest.XCurrentContextChecker
;
import
test.testtools.bridgetest.XMulti
;
import
test.testtools.bridgetest.XRecursiveCall
;
import
com.sun.star.lang.IllegalArgumentException
;
import
com.sun.star.lang.XMultiServiceFactory
;
import
com.sun.star.lang.XSingleServiceFactory
;
...
...
@@ -474,6 +479,22 @@ public class TestComponent {
return
_testDataElements
;
}
public
SmallStruct
echoSmallStruct
(
SmallStruct
i_Struct
)
throws
com
.
sun
.
star
.
uno
.
RuntimeException
{
return
i_Struct
;
}
public
MediumStruct
echoMediumStruct
(
MediumStruct
i_Struct
)
throws
com
.
sun
.
star
.
uno
.
RuntimeException
{
return
i_Struct
;
}
public
BigStruct
echoBigStruct
(
BigStruct
i_Struct
)
throws
com
.
sun
.
star
.
uno
.
RuntimeException
{
return
i_Struct
;
}
public
AllFloats
echoAllFloats
(
AllFloats
i_Struct
)
throws
com
.
sun
.
star
.
uno
.
RuntimeException
{
return
i_Struct
;
}
// Attributes
public
boolean
getBool
()
throws
com
.
sun
.
star
.
uno
.
RuntimeException
{
return
_bool
;
...
...
testtools/source/bridgetest/bridgetest.cxx
Dosyayı görüntüle @
52da3422
...
...
@@ -32,6 +32,7 @@
#include "precompiled_testtools.hxx"
#include <stdio.h>
#include <string.h>
#include <osl/diagnose.h>
#include "osl/diagnose.hxx"
#include <osl/time.h>
...
...
@@ -533,6 +534,27 @@ static sal_Bool performTest(
bRet
=
check
(
equals
(
aData
,
aRet
)
&&
equals
(
aData
,
aRet2
)
,
"struct comparison test"
)
&&
bRet
;
{
SmallStruct
aIn
(
1
,
2
);
SmallStruct
aOut
=
xLBT
->
echoSmallStruct
(
aIn
);
bRet
=
check
(
memcmp
(
&
aIn
,
&
aOut
,
sizeof
(
SmallStruct
))
==
0
,
"small struct test"
)
&&
bRet
;
}
{
MediumStruct
aIn
(
1
,
2
,
3
,
4
);
MediumStruct
aOut
=
xLBT
->
echoMediumStruct
(
aIn
);
bRet
=
check
(
memcmp
(
&
aIn
,
&
aOut
,
sizeof
(
MediumStruct
))
==
0
,
"medium struct test"
)
&&
bRet
;
}
{
BigStruct
aIn
(
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
);
BigStruct
aOut
=
xLBT
->
echoBigStruct
(
aIn
);
bRet
=
check
(
memcmp
(
&
aIn
,
&
aOut
,
sizeof
(
BigStruct
))
==
0
,
"big struct test"
)
&&
bRet
;
}
{
AllFloats
aIn
(
1.1
,
2.2
,
3.3
,
4.4
);
AllFloats
aOut
=
xLBT
->
echoAllFloats
(
aIn
);
bRet
=
check
(
memcmp
(
&
aIn
,
&
aOut
,
sizeof
(
AllFloats
))
==
0
,
"all floats struct test"
)
&&
bRet
;
}
// Test extended attributes that raise exceptions:
try
{
xLBT
->
getRaiseAttr1
();
...
...
testtools/source/bridgetest/cppobj.cxx
Dosyayı görüntüle @
52da3422
...
...
@@ -217,6 +217,15 @@ public:
TestData
&
rStruct
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
SmallStruct
echoSmallStruct
(
const
SmallStruct
&
rStruct
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
return
rStruct
;
}
virtual
MediumStruct
echoMediumStruct
(
const
MediumStruct
&
rStruct
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
return
rStruct
;
}
virtual
BigStruct
echoBigStruct
(
const
BigStruct
&
rStruct
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
return
rStruct
;
}
virtual
AllFloats
echoAllFloats
(
const
AllFloats
&
rStruct
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
return
rStruct
;
}
virtual
sal_Bool
SAL_CALL
getBool
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
)
{
return
_aData
.
Bool
;
}
virtual
sal_Int8
SAL_CALL
getByte
()
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
)
...
...
testtools/source/bridgetest/idl/bridgetest.idl
Dosyayı görüntüle @
52da3422
...
...
@@ -71,6 +71,48 @@ struct TestSimple
double
Double
;
TestEnum
Enum
;
}
;
/**
*
equal
to
max
size
returned
in
registers
on
x86_64
*/
struct
SmallStruct
{
hyper
a
;
hyper
b
;
}
;
/**
*
equal
to
max
size
returned
in
registers
on
ia64
*/
struct
MediumStruct
{
hyper
a
;
hyper
b
;
hyper
c
;
hyper
d
;
}
;
/**
*
bigger
than
max
size
returned
in
registers
on
ia64
*/
struct
BigStruct
{
hyper
a
;
hyper
b
;
hyper
c
;
hyper
d
;
hyper
e
;
hyper
f
;
hyper
g
;
hyper
h
;
}
;
/**
*
all
floats
,
ia64
handles
them
specially
*/
struct
AllFloats
{
float
a
;
float
b
;
float
c
;
float
d
;
}
;
/**
*
complex
types
adding
string
,
inteface
,
any
*/
...
...
@@ -207,6 +249,26 @@ interface XBridgeTestBase : com::sun::star::uno::XInterface
[
out
]
sequence
<
TestElement
>
aSequence
,
[
out
]
TestData
aStruct
)
;
/**
*
register
return
test
1
*/
SmallStruct
echoSmallStruct
(
[
in
]
SmallStruct
aStruct
)
;
/**
*
register
return
test
2
*/
MediumStruct
echoMediumStruct
(
[
in
]
MediumStruct
aStruct
)
;
/**
*
register
return
test
3
*/
BigStruct
echoBigStruct
(
[
in
]
BigStruct
aStruct
)
;
/**
*
register
return
test
4
*/
AllFloats
echoAllFloats
(
[
in
]
AllFloats
aStruct
)
;
[
attribute
]
boolean
Bool
;
[
attribute
]
byte
Byte
;
[
attribute
]
char
Char
;
...
...
testtools/source/bridgetest/makefile.mk
Dosyayı görüntüle @
52da3422
...
...
@@ -134,7 +134,7 @@ JAVATARGETS=\
.INCLUDE
:
target.mk
.IF
"$(L10N_framework)"
==
""
ALLTAR
:
\
test
\
run
test
\
$(DLLDEST)$/uno_types.rdb
\
$(DLLDEST)$/uno_services.rdb
\
$(DLLDEST)$/bridgetest_inprocess$(BATCH_SUFFIX)
\
...
...
@@ -144,8 +144,11 @@ ALLTAR: \
#################################################################
test
:
echo
$(compcheck)
runtest
:
$(DLLDEST)$/uno_types.rdb $(DLLDEST)$/uno_services.rdb makefile.mk
cd
$(DLLDEST)
&&
$(AUGMENT_LIBRARY_PATH)
$(SOLARBINDIR)/uno
\
-ro
uno_services.rdb
-ro
uno_types.rdb
\
-s
com.sun.star.test.bridge.BridgeTest
--
\
com.sun.star.test.bridge.CppTestObject
$(DLLDEST)$/uno_types.rdb
:
$(SOLARBINDIR)$/udkapi.rdb
echo
$(DLLDEST)
...
...
testtools/source/bridgetest/pyuno/makefile.mk
Dosyayı görüntüle @
52da3422
...
...
@@ -92,7 +92,7 @@ PYCOMPONENTS = \
ALL
:
\
$(PYFILES)
\
$(DLLDEST)$/pyuno_regcomp.rdb
\
doc
\
runtest
\
ALLTAR
.ENDIF
# L10N_framework
...
...
@@ -111,11 +111,8 @@ $(DLLDEST)$/pyuno_regcomp.rdb: $(DLLDEST)$/uno_types.rdb $(SOLARBINDIR)$/pyuno_s
-rm
-f
$@
$(WRAPCMD)
$(REGMERGE)
$(DLLDEST)$/pyuno_regcomp.rdb
/
$(DLLDEST)$/uno_types.rdb
$(SOLARBINDIR)$/pyuno_services.rdb
doc .PHONY
:
@echo
start
test
with
dmake
runtest
runtest
:
ALL
cd
$(DLLDEST)
&&
$(TEST_ENV)
&&
python
main.py
runtest
:
$(DLLDEST)$/pyuno_regcomp.rdb $(PYFILES)
cd
$(DLLDEST)
&&
$(TEST_ENV)
&&
$(PYTHON)
main.py
cd
$(DLLDEST)
&&
$(TEST_ENV)
&&
$(WRAPCMD)
$(REGCOMP)
-register
-br
pyuno_regcomp.rdb
-r
dummy.rdb
\
-l com.sun.star.loader.Python $(foreach,i,$(PYCOMPONENTS) -c vnd.openoffice.pymodule
:
$(i))
cd
$(DLLDEST)
&&
$(TEST_ENV)
&&
$(WRAPCMD)
$(REGCOMP)
-register
-br
pyuno_regcomp.rdb
-r
dummy2.rdb
\
...
...
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