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
3c8bee80
Kaydet (Commit)
3c8bee80
authored
Eyl 03, 2013
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#68839: add unit test
Change-Id: Ic47bfdeb1466a3772c95008dbf035f294cc3ece4
üst
ba083e5c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
CppunitTest_sw_odfimport.mk
sw/CppunitTest_sw_odfimport.mk
+1
-0
fdo68839.odt
sw/qa/extras/odfimport/data/fdo68839.odt
+0
-0
odfimport.cxx
sw/qa/extras/odfimport/odfimport.cxx
+35
-0
No files found.
sw/CppunitTest_sw_odfimport.mk
Dosyayı görüntüle @
3c8bee80
...
@@ -51,6 +51,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_odfimport,\
...
@@ -51,6 +51,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_odfimport,\
basic/util/sb \
basic/util/sb \
comphelper/util/comphelp \
comphelper/util/comphelp \
configmgr/source/configmgr \
configmgr/source/configmgr \
embeddedobj/util/embobj \
fileaccess/source/fileacc \
fileaccess/source/fileacc \
filter/source/config/cache/filterconfig1 \
filter/source/config/cache/filterconfig1 \
framework/util/fwk \
framework/util/fwk \
...
...
sw/qa/extras/odfimport/data/fdo68839.odt
0 → 100644
Dosyayı görüntüle @
3c8bee80
File added
sw/qa/extras/odfimport/odfimport.cxx
Dosyayı görüntüle @
3c8bee80
...
@@ -27,6 +27,7 @@ public:
...
@@ -27,6 +27,7 @@ public:
void
testFdo60842
();
void
testFdo60842
();
void
testFdo56272
();
void
testFdo56272
();
void
testFdo55814
();
void
testFdo55814
();
void
testFdo68839
();
CPPUNIT_TEST_SUITE
(
Test
);
CPPUNIT_TEST_SUITE
(
Test
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
...
@@ -50,6 +51,7 @@ void Test::run()
...
@@ -50,6 +51,7 @@ void Test::run()
{
"fdo60842.odt"
,
&
Test
::
testFdo60842
},
{
"fdo60842.odt"
,
&
Test
::
testFdo60842
},
{
"fdo56272.odt"
,
&
Test
::
testFdo56272
},
{
"fdo56272.odt"
,
&
Test
::
testFdo56272
},
{
"fdo55814.odt"
,
&
Test
::
testFdo55814
},
{
"fdo55814.odt"
,
&
Test
::
testFdo55814
},
{
"fdo68839.odt"
,
&
Test
::
testFdo68839
},
};
};
header
();
header
();
for
(
unsigned
int
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aMethods
);
++
i
)
for
(
unsigned
int
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aMethods
);
++
i
)
...
@@ -320,6 +322,39 @@ void Test::testFdo55814()
...
@@ -320,6 +322,39 @@ void Test::testFdo55814()
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Hide==
\"
Yes
\"
"
),
getProperty
<
OUString
>
(
xSections
->
getByIndex
(
0
),
"Condition"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"Hide==
\"
Yes
\"
"
),
getProperty
<
OUString
>
(
xSections
->
getByIndex
(
0
),
"Condition"
));
}
}
void
lcl_CheckShape
(
uno
::
Reference
<
drawing
::
XShape
>
const
&
xShape
,
OUString
const
&
rExpected
)
{
uno
::
Reference
<
container
::
XNamed
>
const
xNamed
(
xShape
,
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT
(
xNamed
.
is
());
CPPUNIT_ASSERT_EQUAL
(
rExpected
,
xNamed
->
getName
());
}
void
Test
::
testFdo68839
()
{
// check names
lcl_CheckShape
(
getShape
(
1
),
"FrameXXX"
);
lcl_CheckShape
(
getShape
(
2
),
"ObjectXXX"
);
lcl_CheckShape
(
getShape
(
3
),
"FrameY"
);
lcl_CheckShape
(
getShape
(
4
),
"graphicsXXX"
);
try
{
uno
::
Reference
<
drawing
::
XShape
>
xShape
=
getShape
(
5
);
CPPUNIT_ASSERT
(
!
"IndexOutOfBoundsException expected"
);
}
catch
(
lang
::
IndexOutOfBoundsException
const
&
)
{
}
// check prev/next chain
uno
::
Reference
<
beans
::
XPropertySet
>
xFrame1
(
getShape
(
1
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xFrame2
(
getShape
(
3
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_EQUAL
(
OUString
(),
getProperty
<
OUString
>
(
xFrame1
,
"ChainPrevName"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"FrameY"
),
getProperty
<
OUString
>
(
xFrame1
,
"ChainNextName"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(
"FrameXXX"
),
getProperty
<
OUString
>
(
xFrame2
,
"ChainPrevName"
));
CPPUNIT_ASSERT_EQUAL
(
OUString
(),
getProperty
<
OUString
>
(
xFrame2
,
"ChainNextName"
));
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
Test
);
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
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