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
5beec739
Kaydet (Commit)
5beec739
authored
Tem 31, 2014
tarafından
Andrzej Hunt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
LOK: add test for getDocumentType.
Change-Id: I264567f73dae9ecd061e09c4413857f793fcac48
üst
cc7f66dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
0 deletions
+30
-0
blank_presentation.odp
libreofficekit/qa/data/blank_presentation.odp
+0
-0
blank_text.odt
libreofficekit/qa/data/blank_text.odt
+0
-0
tiledrendering.cxx
libreofficekit/qa/unit/tiledrendering.cxx
+30
-0
No files found.
libreofficekit/qa/data/blank_presentation.odp
0 → 100644
Dosyayı görüntüle @
5beec739
File added
libreofficekit/qa/data/blank_text.odt
0 → 100644
Dosyayı görüntüle @
5beec739
File added
libreofficekit/qa/unit/tiledrendering.cxx
Dosyayı görüntüle @
5beec739
...
@@ -48,6 +48,7 @@ public:
...
@@ -48,6 +48,7 @@ public:
// components on the one Office instance that we retrieve.
// components on the one Office instance that we retrieve.
void
runAllTests
();
void
runAllTests
();
void
testDocumentTypes
(
Office
*
pOffice
);
void
testImpressSlideNames
(
Office
*
pOffice
);
void
testImpressSlideNames
(
Office
*
pOffice
);
void
testOverlay
(
Office
*
pOffice
);
void
testOverlay
(
Office
*
pOffice
);
...
@@ -62,6 +63,7 @@ void TiledRenderingTest::runAllTests()
...
@@ -62,6 +63,7 @@ void TiledRenderingTest::runAllTests()
m_sLOPath
.
c_str
()
)
);
m_sLOPath
.
c_str
()
)
);
CPPUNIT_ASSERT
(
pOffice
.
get
()
);
CPPUNIT_ASSERT
(
pOffice
.
get
()
);
testDocumentTypes
(
pOffice
.
get
()
);
testImpressSlideNames
(
pOffice
.
get
()
);
testImpressSlideNames
(
pOffice
.
get
()
);
testOverlay
(
pOffice
.
get
()
);
testOverlay
(
pOffice
.
get
()
);
}
}
...
@@ -83,6 +85,34 @@ static void dumpRGBABitmap( const OUString& rPath, const unsigned char* pBuffer,
...
@@ -83,6 +85,34 @@ static void dumpRGBABitmap( const OUString& rPath, const unsigned char* pBuffer,
sOutput
.
Close
();
sOutput
.
Close
();
}
}
LibreOfficeKitDocumentType
getDocumentType
(
Office
*
pOffice
,
const
string
&
rPath
)
{
scoped_ptr
<
Document
>
pDocument
(
pOffice
->
documentLoad
(
rPath
.
c_str
()
)
);
CPPUNIT_ASSERT
(
pDocument
.
get
()
);
return
pDocument
->
getDocumentType
();
}
void
TiledRenderingTest
::
testDocumentTypes
(
Office
*
pOffice
)
{
const
string
sTextDocPath
=
m_sSrcRoot
+
"/libreofficekit/qa/data/blank_text.odt"
;
const
string
sTextLockFile
=
m_sSrcRoot
+
"/libreofficekit/qa/data/.~lock.blank_text.odt#"
;
// FIXME: same comment as below wrt lockfile removal.
remove
(
sTextLockFile
.
c_str
()
);
CPPUNIT_ASSERT
(
getDocumentType
(
pOffice
,
sTextDocPath
)
==
LOK_DOCTYPE_TEXT
);
const
string
sPresentationDocPath
=
m_sSrcRoot
+
"/libreofficekit/qa/data/blank_presentation.odp"
;
const
string
sPresentationLockFile
=
m_sSrcRoot
+
"/libreofficekit/qa/data/.~lock.blank_presentation.odp#"
;
// FIXME: same comment as below wrt lockfile removal.
remove
(
sPresentationLockFile
.
c_str
()
);
CPPUNIT_ASSERT
(
getDocumentType
(
pOffice
,
sPresentationDocPath
)
==
LOK_DOCTYPE_PRESENTATION
);
// TODO: do this for all supported document types
}
void
TiledRenderingTest
::
testImpressSlideNames
(
Office
*
pOffice
)
void
TiledRenderingTest
::
testImpressSlideNames
(
Office
*
pOffice
)
{
{
const
string
sDocPath
=
m_sSrcRoot
+
"/libreofficekit/qa/data/impress_slidenames.odp"
;
const
string
sDocPath
=
m_sSrcRoot
+
"/libreofficekit/qa/data/impress_slidenames.odp"
;
...
...
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