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
ba70050d
Kaydet (Commit)
ba70050d
authored
Haz 18, 2015
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add test case document to unit tests, tdf#69552
Change-Id: I73da1e00dd2b19088fbbe7e999611835f2ed4882
üst
bcace9ac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
1 deletion
+69
-1
ceiling-floor.xlsx
sc/qa/unit/data/xlsx/ceiling-floor.xlsx
+0
-0
shared_test_impl.hxx
sc/qa/unit/helper/shared_test_impl.hxx
+15
-0
subsequent_export-test.cxx
sc/qa/unit/subsequent_export-test.cxx
+40
-1
subsequent_filters-test.cxx
sc/qa/unit/subsequent_filters-test.cxx
+14
-0
No files found.
sc/qa/unit/data/xlsx/ceiling-floor.xlsx
0 → 100644
Dosyayı görüntüle @
ba70050d
File added
sc/qa/unit/helper/shared_test_impl.hxx
Dosyayı görüntüle @
ba70050d
...
...
@@ -271,6 +271,21 @@ void testFunctionsExcel2010_Impl( ScDocument& rDoc )
}
}
void
testCeilingFloor_Impl
(
ScDocument
&
rDoc
)
{
// Original test case document is ceiling-floor.xlsx
// Sheet1.K1 has =AND(K3:K81) to evaluate all results.
const
char
*
pORef
=
"Sheet1.K1"
;
OUString
aRef
(
OUString
::
createFromAscii
(
pORef
));
ScAddress
aPos
;
aPos
.
Parse
(
aRef
);
if
(
!
checkFormula
(
rDoc
,
aPos
,
"AND(K3:K81)"
))
CPPUNIT_FAIL
(
"Wrong formula."
);
CPPUNIT_ASSERT_MESSAGE
(
OString
(
OString
(
pORef
)
+
" result is error."
).
getStr
(),
isFormulaWithoutError
(
rDoc
,
aPos
));
CPPUNIT_ASSERT_EQUAL
(
1.0
,
rDoc
.
GetValue
(
aPos
));
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/qa/unit/subsequent_export-test.cxx
Dosyayı görüntüle @
ba70050d
...
...
@@ -126,6 +126,11 @@ public:
void
testFunctionsExcel2010XLS
();
void
testFunctionsExcel2010ODS
();
void
testCeilingFloor
(
sal_uLong
nFormatType
);
void
testCeilingFloorXLSX
();
void
testCeilingFloorXLS
();
void
testCeilingFloorODS
();
void
testRelativePaths
();
void
testSheetProtection
();
...
...
@@ -182,13 +187,16 @@ public:
CPPUNIT_TEST
(
testSharedFormulaStringResultExportXLSX
);
CPPUNIT_TEST
(
testFunctionsExcel2010XLSX
);
CPPUNIT_TEST
(
testFunctionsExcel2010XLS
);
CPPUNIT_TEST
(
testFunctionsExcel2010ODS
);
CPPUNIT_TEST
(
testCeilingFloorXLSX
);
CPPUNIT_TEST
(
testCeilingFloorXLS
);
CPPUNIT_TEST
(
testCeilingFloorODS
);
#if !defined(WNT)
CPPUNIT_TEST
(
testRelativePaths
);
#endif
CPPUNIT_TEST
(
testSheetProtection
);
CPPUNIT_TEST
(
testPivotTableXLSX
);
CPPUNIT_TEST
(
testPivotTableTwoDataFieldsXLSX
);
CPPUNIT_TEST
(
testFunctionsExcel2010ODS
);
#if !defined(WNT)
CPPUNIT_TEST
(
testSupBookVirtualPath
);
#endif
...
...
@@ -1988,6 +1996,37 @@ void ScExportTest::testFunctionsExcel2010XLS()
testFunctionsExcel2010
(
XLS
);
}
void
ScExportTest
::
testCeilingFloor
(
sal_uLong
nFormatType
)
{
ScDocShellRef
xShell
=
loadDoc
(
"ceiling-floor."
,
XLSX
);
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load the document."
,
xShell
.
Is
());
ScDocShellRef
xDocSh
=
saveAndReload
(
xShell
,
nFormatType
);
ScDocument
&
rDoc
=
xDocSh
->
GetDocument
();
rDoc
.
CalcAll
();
// perform hard re-calculation.
testCeilingFloor_Impl
(
rDoc
);
xDocSh
->
DoClose
();
}
void
ScExportTest
::
testCeilingFloorXLSX
()
{
testCeilingFloor
(
XLSX
);
}
void
ScExportTest
::
testCeilingFloorXLS
()
{
// CEILING.PRECISE() and FLOOR.PRECISE() with one parameter only currently
// (2015-06-18) don't survive .xls save/reload and give NA()
//testCeilingFloor(XLS);
}
void
ScExportTest
::
testCeilingFloorODS
()
{
testCeilingFloor
(
ODS
);
}
void
ScExportTest
::
testRelativePaths
()
{
ScDocShellRef
xDocSh
=
loadDoc
(
"fdo79305."
,
ODS
);
...
...
sc/qa/unit/subsequent_filters-test.cxx
Dosyayı görüntüle @
ba70050d
...
...
@@ -107,6 +107,7 @@ public:
void
testHardRecalcODS
();
void
testFunctionsODS
();
void
testFunctionsExcel2010
();
void
testCeilingFloorXLSX
();
void
testCachedFormulaResultsODS
();
void
testCachedMatrixFormulaResultsODS
();
void
testFormulaDepAcrossSheetsODS
();
...
...
@@ -213,6 +214,7 @@ public:
CPPUNIT_TEST
(
testHardRecalcODS
);
CPPUNIT_TEST
(
testFunctionsODS
);
CPPUNIT_TEST
(
testFunctionsExcel2010
);
CPPUNIT_TEST
(
testCeilingFloorXLSX
);
CPPUNIT_TEST
(
testCachedFormulaResultsODS
);
CPPUNIT_TEST
(
testFormulaDepAcrossSheetsODS
);
CPPUNIT_TEST
(
testFormulaDepDeleteContentsODS
);
...
...
@@ -547,6 +549,18 @@ void ScFiltersTest::testFunctionsExcel2010()
xDocSh
->
DoClose
();
}
void
ScFiltersTest
::
testCeilingFloorXLSX
()
{
ScDocShellRef
xDocSh
=
loadDoc
(
"ceiling-floor."
,
XLSX
);
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load the document."
,
xDocSh
.
Is
());
ScDocument
&
rDoc
=
xDocSh
->
GetDocument
();
rDoc
.
CalcAll
();
// perform hard re-calculation.
testCeilingFloor_Impl
(
rDoc
);
xDocSh
->
DoClose
();
}
void
ScFiltersTest
::
testCachedFormulaResultsODS
()
{
{
...
...
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