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
0bc368ba
Kaydet (Commit)
0bc368ba
authored
Eyl 10, 2011
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add files for bugFix tests and restructure filters-test a bit
üst
8b309a9e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
2 deletions
+58
-2
bugFixes.ods
sc/qa/unit/data/ods/bugFixes.ods
+0
-0
bugFixes.xls
sc/qa/unit/data/xls/bugFixes.xls
+0
-0
bugFixes.xlsx
sc/qa/unit/data/xlsx/bugFixes.xlsx
+0
-0
filters-test.cxx
sc/qa/unit/filters-test.cxx
+58
-2
No files found.
sc/qa/unit/data/ods/bugFixes.ods
0 → 100644
Dosyayı görüntüle @
0bc368ba
File added
sc/qa/unit/data/xls/bugFixes.xls
0 → 100644
Dosyayı görüntüle @
0bc368ba
File added
sc/qa/unit/data/xlsx/bugFixes.xlsx
0 → 100644
Dosyayı görüntüle @
0bc368ba
File added
sc/qa/unit/filters-test.cxx
Dosyayı görüntüle @
0bc368ba
...
@@ -155,12 +155,18 @@ public:
...
@@ -155,12 +155,18 @@ public:
void
testContent
();
void
testContent
();
void
testContentImpl
(
ScDocument
*
pDoc
);
//same code for ods, xls, xlsx
void
testContentImpl
(
ScDocument
*
pDoc
);
//same code for ods, xls, xlsx
void
testFunctions
();
void
testFunctions
();
void
testBugFixesODS
();
void
testBugFixesXLS
();
void
testBugFixesXLSX
();
CPPUNIT_TEST_SUITE
(
FiltersTest
);
CPPUNIT_TEST_SUITE
(
FiltersTest
);
CPPUNIT_TEST
(
testCVEs
);
CPPUNIT_TEST
(
testCVEs
);
CPPUNIT_TEST
(
testRangeName
);
CPPUNIT_TEST
(
testRangeName
);
CPPUNIT_TEST
(
testContent
);
CPPUNIT_TEST
(
testContent
);
CPPUNIT_TEST
(
testFunctions
);
CPPUNIT_TEST
(
testFunctions
);
CPPUNIT_TEST
(
testBugFixesODS
);
CPPUNIT_TEST
(
testBugFixesXLS
);
CPPUNIT_TEST
(
testBugFixesXLSX
);
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
private
:
private
:
...
@@ -319,7 +325,8 @@ void FiltersTest::testRangeName()
...
@@ -319,7 +325,8 @@ void FiltersTest::testRangeName()
{
{
rtl
::
OUString
aFileExtension
(
aFileFormats
[
i
].
pName
,
strlen
(
aFileFormats
[
i
].
pName
),
RTL_TEXTENCODING_UTF8
);
rtl
::
OUString
aFileExtension
(
aFileFormats
[
i
].
pName
,
strlen
(
aFileFormats
[
i
].
pName
),
RTL_TEXTENCODING_UTF8
);
rtl
::
OUString
aFilterName
(
aFileFormats
[
i
].
pFilterName
,
strlen
(
aFileFormats
[
i
].
pFilterName
),
RTL_TEXTENCODING_UTF8
)
;
rtl
::
OUString
aFilterName
(
aFileFormats
[
i
].
pFilterName
,
strlen
(
aFileFormats
[
i
].
pFilterName
),
RTL_TEXTENCODING_UTF8
)
;
rtl
::
OUString
aFileName
=
m_aSrcRoot
+
m_aBaseString
+
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/"
))
+
aFileExtension
+
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/"
))
+
aFileNameBase
+
aFileExtension
;
rtl
::
OUString
aFileName
;
createFilePath
(
aFileNameBase
,
aFileExtension
,
aFileName
);
rtl
::
OUString
aFilterType
(
aFileFormats
[
i
].
pTypeName
,
strlen
(
aFileFormats
[
i
].
pTypeName
),
RTL_TEXTENCODING_UTF8
);
rtl
::
OUString
aFilterType
(
aFileFormats
[
i
].
pTypeName
,
strlen
(
aFileFormats
[
i
].
pTypeName
),
RTL_TEXTENCODING_UTF8
);
std
::
cout
<<
aFileFormats
[
i
].
pName
<<
" Test"
<<
std
::
endl
;
std
::
cout
<<
aFileFormats
[
i
].
pName
<<
" Test"
<<
std
::
endl
;
ScDocShellRef
xDocSh
=
load
(
aFilterName
,
aFileName
,
rtl
::
OUString
(),
aFilterType
,
aFileFormats
[
i
].
nFormatType
);
ScDocShellRef
xDocSh
=
load
(
aFilterName
,
aFileName
,
rtl
::
OUString
(),
aFilterType
,
aFileFormats
[
i
].
nFormatType
);
...
@@ -373,7 +380,8 @@ void FiltersTest::testContent()
...
@@ -373,7 +380,8 @@ void FiltersTest::testContent()
{
{
rtl
::
OUString
aFileExtension
(
aFileFormats
[
i
].
pName
,
strlen
(
aFileFormats
[
i
].
pName
),
RTL_TEXTENCODING_UTF8
);
rtl
::
OUString
aFileExtension
(
aFileFormats
[
i
].
pName
,
strlen
(
aFileFormats
[
i
].
pName
),
RTL_TEXTENCODING_UTF8
);
rtl
::
OUString
aFilterName
(
aFileFormats
[
i
].
pFilterName
,
strlen
(
aFileFormats
[
i
].
pFilterName
),
RTL_TEXTENCODING_UTF8
)
;
rtl
::
OUString
aFilterName
(
aFileFormats
[
i
].
pFilterName
,
strlen
(
aFileFormats
[
i
].
pFilterName
),
RTL_TEXTENCODING_UTF8
)
;
rtl
::
OUString
aFileName
=
m_aSrcRoot
+
m_aBaseString
+
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/"
))
+
aFileExtension
+
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/"
))
+
aFileNameBase
+
aFileExtension
;
rtl
::
OUString
aFileName
;
createFilePath
(
aFileNameBase
,
aFileExtension
,
aFileName
);
rtl
::
OUString
aFilterType
(
aFileFormats
[
i
].
pTypeName
,
strlen
(
aFileFormats
[
i
].
pTypeName
),
RTL_TEXTENCODING_UTF8
);
rtl
::
OUString
aFilterType
(
aFileFormats
[
i
].
pTypeName
,
strlen
(
aFileFormats
[
i
].
pTypeName
),
RTL_TEXTENCODING_UTF8
);
std
::
cout
<<
aFileFormats
[
i
].
pName
<<
" Test"
<<
std
::
endl
;
std
::
cout
<<
aFileFormats
[
i
].
pName
<<
" Test"
<<
std
::
endl
;
ScDocShellRef
xDocSh
=
load
(
aFilterName
,
aFileName
,
rtl
::
OUString
(),
aFilterType
,
aFileFormats
[
i
].
nFormatType
);
ScDocShellRef
xDocSh
=
load
(
aFilterName
,
aFileName
,
rtl
::
OUString
(),
aFilterType
,
aFileFormats
[
i
].
nFormatType
);
...
@@ -402,6 +410,54 @@ void FiltersTest::testFunctions()
...
@@ -402,6 +410,54 @@ void FiltersTest::testFunctions()
testFile
(
aCSVFileName
,
pDoc
,
0
);
testFile
(
aCSVFileName
,
pDoc
,
0
);
}
}
void
FiltersTest
::
testBugFixesODS
()
{
const
rtl
::
OUString
aFileNameBase
(
RTL_CONSTASCII_USTRINGPARAM
(
"bugFixes."
));
rtl
::
OUString
aFileExtension
(
aFileFormats
[
0
].
pName
,
strlen
(
aFileFormats
[
0
].
pName
),
RTL_TEXTENCODING_UTF8
);
rtl
::
OUString
aFilterName
(
aFileFormats
[
0
].
pFilterName
,
strlen
(
aFileFormats
[
0
].
pFilterName
),
RTL_TEXTENCODING_UTF8
)
;
rtl
::
OUString
aFileName
;
createFilePath
(
aFileNameBase
,
aFileExtension
,
aFileName
);
rtl
::
OUString
aFilterType
(
aFileFormats
[
0
].
pTypeName
,
strlen
(
aFileFormats
[
0
].
pTypeName
),
RTL_TEXTENCODING_UTF8
);
std
::
cout
<<
aFileFormats
[
0
].
pName
<<
" Test"
<<
std
::
endl
;
ScDocShellRef
xDocSh
=
load
(
aFilterName
,
aFileName
,
rtl
::
OUString
(),
aFilterType
,
aFileFormats
[
0
].
nFormatType
);
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load bugFixes.ods"
,
xDocSh
.
Is
());
ScDocument
*
pDoc
=
xDocSh
->
GetDocument
();
CPPUNIT_ASSERT_MESSAGE
(
"No Document"
,
pDoc
);
//remove with first test
}
void
FiltersTest
::
testBugFixesXLS
()
{
const
rtl
::
OUString
aFileNameBase
(
RTL_CONSTASCII_USTRINGPARAM
(
"bugFixes."
));
rtl
::
OUString
aFileExtension
(
aFileFormats
[
1
].
pName
,
strlen
(
aFileFormats
[
1
].
pName
),
RTL_TEXTENCODING_UTF8
);
rtl
::
OUString
aFilterName
(
aFileFormats
[
1
].
pFilterName
,
strlen
(
aFileFormats
[
1
].
pFilterName
),
RTL_TEXTENCODING_UTF8
)
;
rtl
::
OUString
aFileName
;
createFilePath
(
aFileNameBase
,
aFileExtension
,
aFileName
);
rtl
::
OUString
aFilterType
(
aFileFormats
[
1
].
pTypeName
,
strlen
(
aFileFormats
[
1
].
pTypeName
),
RTL_TEXTENCODING_UTF8
);
std
::
cout
<<
aFileFormats
[
1
].
pName
<<
" Test"
<<
std
::
endl
;
ScDocShellRef
xDocSh
=
load
(
aFilterName
,
aFileName
,
rtl
::
OUString
(),
aFilterType
,
aFileFormats
[
1
].
nFormatType
);
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load bugFixes.xls"
,
xDocSh
.
Is
());
ScDocument
*
pDoc
=
xDocSh
->
GetDocument
();
CPPUNIT_ASSERT_MESSAGE
(
"No Document"
,
pDoc
);
//remove with first test
}
void
FiltersTest
::
testBugFixesXLSX
()
{
const
rtl
::
OUString
aFileNameBase
(
RTL_CONSTASCII_USTRINGPARAM
(
"bugFixes."
));
rtl
::
OUString
aFileExtension
(
aFileFormats
[
2
].
pName
,
strlen
(
aFileFormats
[
2
].
pName
),
RTL_TEXTENCODING_UTF8
);
rtl
::
OUString
aFilterName
(
aFileFormats
[
2
].
pFilterName
,
strlen
(
aFileFormats
[
2
].
pFilterName
),
RTL_TEXTENCODING_UTF8
)
;
rtl
::
OUString
aFileName
;
createFilePath
(
aFileNameBase
,
aFileExtension
,
aFileName
);
rtl
::
OUString
aFilterType
(
aFileFormats
[
2
].
pTypeName
,
strlen
(
aFileFormats
[
2
].
pTypeName
),
RTL_TEXTENCODING_UTF8
);
std
::
cout
<<
aFileFormats
[
2
].
pName
<<
" Test"
<<
std
::
endl
;
ScDocShellRef
xDocSh
=
load
(
aFilterName
,
aFileName
,
rtl
::
OUString
(),
aFilterType
,
aFileFormats
[
2
].
nFormatType
);
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load bugFixes.xlsx"
,
xDocSh
.
Is
());
ScDocument
*
pDoc
=
xDocSh
->
GetDocument
();
CPPUNIT_ASSERT_MESSAGE
(
"No Document"
,
pDoc
);
//remove with first test
}
FiltersTest
::
FiltersTest
()
FiltersTest
::
FiltersTest
()
:
m_aSrcRoot
(
RTL_CONSTASCII_USTRINGPARAM
(
"file://"
)),
:
m_aSrcRoot
(
RTL_CONSTASCII_USTRINGPARAM
(
"file://"
)),
m_aBaseString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/sc/qa/unit/data"
))
m_aBaseString
(
RTL_CONSTASCII_USTRINGPARAM
(
"/sc/qa/unit/data"
))
...
...
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