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
42899582
Kaydet (Commit)
42899582
authored
Nis 18, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
enable the chart2 dumper test
üst
55b823c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
169 additions
and
1 deletion
+169
-1
testChart.xml
chart2/qa/unit/data/reference/testChart.xml
+126
-0
Module_sc.mk
sc/Module_sc.mk
+1
-0
regression-test.cxx
sc/qa/extras/regression-test.cxx
+42
-1
No files found.
chart2/qa/unit/data/reference/testChart.xml
0 → 100644
Dosyayı görüntüle @
42899582
<?xml version="1.0"?>
<XShapes>
<XShape
position=
"0,0"
size=
"16000x9000"
type=
"com.sun.star.drawing.RectangleShape"
name=
"CID/Page="
/>
<XShape
position=
"770,854"
size=
"13068x7546"
type=
"com.sun.star.drawing.GroupShape"
name=
"CID/D=0"
>
<XShapes>
<XShape
position=
"1206,1054"
size=
"12632x6699"
type=
"com.sun.star.drawing.RectangleShape"
name=
"MarkHandles"
/>
<XShape
position=
"770,855"
size=
"13068x7545"
type=
"com.sun.star.drawing.RectangleShape"
name=
"PlotAreaIncludingAxes"
/>
<XShape
position=
"770,854"
size=
"13068x7546"
type=
"com.sun.star.drawing.GroupShape"
>
<XShapes>
<XShape
position=
"1056,1052"
size=
"12782x6850"
type=
"com.sun.star.drawing.GroupShape"
>
<XShapes>
<XShape
position=
"1206,1054"
size=
"12632x6699"
type=
"com.sun.star.drawing.GroupShape"
name=
"PlotAreaExcludingAxes"
>
<XShapes>
<XShape
position=
"1206,1054"
size=
"12632x6699"
type=
"com.sun.star.drawing.RectangleShape"
name=
"CID/DiagramWall="
/>
</XShapes>
</XShape>
<XShape
position=
"1056,1052"
size=
"12782x6850"
type=
"com.sun.star.drawing.GroupShape"
name=
"testonly;CooContainer=XXX_CID"
>
<XShapes>
<XShape
position=
"1206,1052"
size=
"12632x6700"
type=
"com.sun.star.drawing.GroupShape"
>
<XShapes>
<XShape
position=
"1206,1052"
size=
"12632x6700"
type=
"com.sun.star.drawing.GroupShape"
name=
"CID/D=0:CS=0:Axis=1,0:Grid=0"
>
<XShapes>
<XShape
position=
"1206,1052"
size=
"12632x6700"
type=
"com.sun.star.drawing.PolyLineShape"
/>
<XShape
position=
"1206,1052"
size=
"0x6700"
type=
"com.sun.star.drawing.PolyLineShape"
name=
"HandlesOnly"
/>
</XShapes>
</XShape>
</XShapes>
</XShape>
<XShape
position=
"1056,1052"
size=
"12782x6850"
type=
"com.sun.star.drawing.GroupShape"
>
<XShapes>
<XShape
position=
"1206,7752"
size=
"12632x150"
type=
"com.sun.star.drawing.GroupShape"
name=
"CID/D=0:CS=0:Axis=0,0"
>
<XShapes>
<XShape
position=
"1206,7752"
size=
"12632x150"
type=
"com.sun.star.drawing.PolyLineShape"
/>
<XShape
position=
"1206,7752"
size=
"12632x0"
type=
"com.sun.star.drawing.LineShape"
name=
"MarkHandles"
/>
</XShapes>
</XShape>
<XShape
position=
"1056,1052"
size=
"150x6700"
type=
"com.sun.star.drawing.GroupShape"
name=
"CID/D=0:CS=0:Axis=1,0"
>
<XShapes>
<XShape
position=
"1056,1052"
size=
"150x6700"
type=
"com.sun.star.drawing.PolyLineShape"
/>
<XShape
position=
"1206,1052"
size=
"0x6700"
type=
"com.sun.star.drawing.LineShape"
name=
"MarkHandles"
/>
</XShapes>
</XShape>
</XShapes>
</XShape>
<XShape
position=
"1627,2169"
size=
"11789x5583"
type=
"com.sun.star.drawing.GroupShape"
>
<XShapes>
<XShape
position=
"1627,2169"
size=
"10947x5583"
type=
"com.sun.star.drawing.GroupShape"
name=
"CID/D=0:CS=0:CT=0:Series=0"
>
<XShapes>
<XShape
position=
"11732,2169"
size=
"842x5583"
type=
"com.sun.star.drawing.PolyPolygonShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=4"
/>
<XShape
position=
"9206,3285"
size=
"842x4467"
type=
"com.sun.star.drawing.PolyPolygonShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=3"
/>
<XShape
position=
"6679,4402"
size=
"843x3350"
type=
"com.sun.star.drawing.PolyPolygonShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=2"
/>
<XShape
position=
"4153,5519"
size=
"842x2233"
type=
"com.sun.star.drawing.PolyPolygonShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=1"
/>
<XShape
position=
"1627,6635"
size=
"842x1117"
type=
"com.sun.star.drawing.PolyPolygonShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=0:Point=0"
/>
</XShapes>
</XShape>
<XShape
position=
"2469,3285"
size=
"10947x4467"
type=
"com.sun.star.drawing.GroupShape"
name=
"CID/D=0:CS=0:CT=0:Series=1"
>
<XShapes>
<XShape
position=
"12574,5519"
size=
"842x2233"
type=
"com.sun.star.drawing.PolyPolygonShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=4"
/>
<XShape
position=
"10048,3285"
size=
"842x4467"
type=
"com.sun.star.drawing.PolyPolygonShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=3"
/>
<XShape
position=
"7522,4402"
size=
"842x3350"
type=
"com.sun.star.drawing.PolyPolygonShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=2"
/>
<XShape
position=
"4995,6635"
size=
"842x1117"
type=
"com.sun.star.drawing.PolyPolygonShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=1"
/>
<XShape
position=
"2469,5519"
size=
"842x2233"
type=
"com.sun.star.drawing.PolyPolygonShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=1:Point=0"
/>
</XShapes>
</XShape>
</XShapes>
</XShape>
</XShapes>
</XShape>
</XShapes>
</XShape>
<XShape
position=
"770,854"
size=
"11898x7546"
type=
"com.sun.star.drawing.GroupShape"
>
<XShapes>
<XShape
position=
"2376,8002"
size=
"10292x398"
type=
"com.sun.star.drawing.GroupShape"
name=
"CID/D=0:CS=0:Axis=0,0"
>
<XShapes>
<XShape
position=
"2376,8002"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"1"
/>
<XShape
position=
"4902,8002"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"2"
/>
<XShape
position=
"7429,8002"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"3"
/>
<XShape
position=
"9955,8002"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"4"
/>
<XShape
position=
"12481,8002"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"5"
/>
</XShapes>
</XShape>
<XShape
position=
"770,854"
size=
"187x7098"
type=
"com.sun.star.drawing.GroupShape"
name=
"CID/D=0:CS=0:Axis=1,0"
>
<XShapes>
<XShape
position=
"770,7554"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"0"
/>
<XShape
position=
"770,6437"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"1"
/>
<XShape
position=
"770,5321"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"2"
/>
<XShape
position=
"770,4204"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"3"
/>
<XShape
position=
"770,3087"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"4"
/>
<XShape
position=
"770,1971"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"5"
/>
<XShape
position=
"770,854"
size=
"187x398"
type=
"com.sun.star.drawing.TextShape"
text=
"6"
/>
</XShapes>
</XShape>
</XShapes>
</XShape>
</XShapes>
</XShape>
</XShapes>
</XShape>
<XShape
position=
"14478,3952"
size=
"1312x1096"
type=
"com.sun.star.drawing.GroupShape"
name=
"CID/D=0:Legend="
>
<XShapes>
<XShape
position=
"14478,3952"
size=
"1312x1096"
type=
"com.sun.star.drawing.RectangleShape"
name=
"MarkHandles"
/>
<XShape
position=
"14594,4145"
size=
"211x211"
type=
"com.sun.star.drawing.GroupShape"
>
<XShapes>
<XShape
position=
"14594,4145"
size=
"211x211"
type=
"com.sun.star.drawing.GroupShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=0:LegendEntry=0"
>
<XShapes>
<XShape
position=
"14594,4145"
size=
"211x211"
type=
"com.sun.star.drawing.RectangleShape"
/>
<XShape
position=
"14594,4145"
size=
"211x211"
type=
"com.sun.star.drawing.RectangleShape"
/>
</XShapes>
</XShape>
</XShapes>
</XShape>
<XShape
position=
"14594,4643"
size=
"211x211"
type=
"com.sun.star.drawing.GroupShape"
>
<XShapes>
<XShape
position=
"14594,4643"
size=
"211x211"
type=
"com.sun.star.drawing.GroupShape"
name=
"CID/MultiClick/D=0:CS=0:CT=0:Series=1:LegendEntry=0"
>
<XShapes>
<XShape
position=
"14594,4643"
size=
"211x211"
type=
"com.sun.star.drawing.RectangleShape"
/>
<XShape
position=
"14594,4643"
size=
"211x211"
type=
"com.sun.star.drawing.RectangleShape"
/>
</XShapes>
</XShape>
</XShapes>
</XShape>
<XShape
position=
"14905,4052"
size=
"769x398"
type=
"com.sun.star.drawing.TextShape"
text=
"test1"
/>
<XShape
position=
"14905,4550"
size=
"769x398"
type=
"com.sun.star.drawing.TextShape"
text=
"test2"
/>
</XShapes>
</XShape>
</XShapes>
sc/Module_sc.mk
Dosyayı görüntüle @
42899582
...
...
@@ -54,6 +54,7 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\
JunitTest_sc_complex \
JunitTest_sc_unoapi \
CppunitTest_sc_cellrangeobj \
CppunitTest_sc_chart_regression_test \
$(if $(filter-out $(OS),IOS), \
CppunitTest_sc_databaserangeobj) \
CppunitTest_sc_datapilottableobj \
...
...
sc/qa/extras/regression-test.cxx
Dosyayı görüntüle @
42899582
...
...
@@ -61,6 +61,46 @@
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
uno
;
namespace
{
bool
checkDumpAgainstFile
(
const
rtl
::
OUString
&
rDump
,
const
rtl
::
OUString
aFilePath
)
{
rtl
::
OString
aOFile
=
rtl
::
OUStringToOString
(
aFilePath
,
RTL_TEXTENCODING_UTF8
);
std
::
ifstream
aFile
(
aOFile
.
getStr
());
CPPUNIT_ASSERT_MESSAGE
(
"file not open"
,
aFile
.
is_open
());
CPPUNIT_ASSERT_MESSAGE
(
"dump is empty"
,
!
rDump
.
isEmpty
());
sal_Int32
nLine
=
1
;
sal_Int32
nIndex
=
0
;
while
(
!
aFile
.
eof
())
{
std
::
string
aLineFile
;
std
::
getline
(
aFile
,
aLineFile
);
sal_Int32
nNewIndex
=
rDump
.
indexOf
(
'\n'
,
nIndex
);
//CPPUNIT_ASSERT( nNewIndex != -1 );
if
(
nNewIndex
==
-
1
)
nNewIndex
=
rDump
.
getLength
();
rtl
::
OUString
aLineDump
=
rDump
.
copy
(
nIndex
,
nNewIndex
-
nIndex
);
nIndex
=
nNewIndex
+
1
;
rtl
::
OString
aOLineDump
=
rtl
::
OUStringToOString
(
aLineDump
,
RTL_TEXTENCODING_UTF8
);
if
(
aLineFile
.
compare
(
aOLineDump
.
getStr
())
)
{
rtl
::
OStringBuffer
aErrorMessage
(
"Mismatch between reference file and dump in line "
);
std
::
cout
<<
rtl
::
OUStringToOString
(
rDump
,
RTL_TEXTENCODING_UTF8
).
getStr
();
aErrorMessage
.
append
(
nLine
).
append
(
".
\n
Expected: "
);
aErrorMessage
.
append
(
aLineFile
.
c_str
()).
append
(
"
\n
Found : "
).
append
(
aOLineDump
);
CPPUNIT_ASSERT_MESSAGE
(
aErrorMessage
.
getStr
(),
false
);
}
nLine
++
;
}
return
true
;
}
}
class
ScChartRegressionTest
:
public
test
::
BootstrapFixture
,
public
unotest
::
MacrosTest
{
public
:
...
...
@@ -129,7 +169,8 @@ void ScChartRegressionTest::test()
CPPUNIT_ASSERT
(
xDumper
.
is
());
rtl
::
OUString
aDump
=
xDumper
->
dump
();
std
::
cout
<<
aDump
<<
std
::
endl
;
bool
bCompare
=
checkDumpAgainstFile
(
aDump
,
getPathFromSrc
(
"/chart2/qa/unit/data/reference/testChart.xml"
)
);
CPPUNIT_ASSERT
(
bCompare
);
}
ScChartRegressionTest
::
ScChartRegressionTest
()
...
...
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