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
9e5b1eb9
Kaydet (Commit)
9e5b1eb9
authored
Tem 13, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#80462: Write test for this.
Change-Id: Icdc83c0264fd76239e8c8772c207cc22ce969a76
üst
5902dcf0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
ucalc.cxx
sc/qa/unit/ucalc.cxx
+36
-0
ucalc.hxx
sc/qa/unit/ucalc.hxx
+2
-0
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
9e5b1eb9
...
...
@@ -5025,6 +5025,42 @@ void Test::testSortHorizontal()
m_pDoc
->
DeleteTab
(
0
);
}
void
Test
::
testSortSingleRow
()
{
// This test case is from fdo#80462.
m_pDoc
->
InsertTab
(
0
,
"Test"
);
// Sort range consists of only one row.
m_pDoc
->
SetString
(
ScAddress
(
0
,
0
,
0
),
"X"
);
m_pDoc
->
SetString
(
ScAddress
(
1
,
0
,
0
),
"Y"
);
// Define A1:B1 as sheet-local anonymous database range.
m_pDoc
->
SetAnonymousDBData
(
0
,
new
ScDBData
(
STR_DB_LOCAL_NONAME
,
0
,
0
,
0
,
1
,
0
));
// Sort A1:B1 horizontally, ascending by row 1.
ScDBDocFunc
aFunc
(
getDocShell
());
ScSortParam
aSortData
;
aSortData
.
nCol1
=
0
;
aSortData
.
nCol2
=
1
;
aSortData
.
nRow1
=
0
;
aSortData
.
nRow2
=
0
;
aSortData
.
bHasHeader
=
true
;
aSortData
.
bByRow
=
true
;
aSortData
.
bIncludePattern
=
true
;
aSortData
.
maKeyState
[
0
].
bDoSort
=
true
;
aSortData
.
maKeyState
[
0
].
nField
=
0
;
aSortData
.
maKeyState
[
0
].
bAscending
=
true
;
// Do the sorting. This should not crash.
bool
bSorted
=
aFunc
.
Sort
(
0
,
aSortData
,
true
,
true
,
true
);
CPPUNIT_ASSERT
(
bSorted
);
m_pDoc
->
DeleteTab
(
0
);
}
void
Test
::
testSortInFormulaGroup
()
{
static
struct
{
...
...
sc/qa/unit/ucalc.hxx
Dosyayı görüntüle @
9e5b1eb9
...
...
@@ -341,6 +341,7 @@ public:
void
testFindAreaPosColRight
();
void
testSort
();
void
testSortHorizontal
();
void
testSortSingleRow
();
void
testSortWithFormulaRefs
();
void
testSortWithStrings
();
void
testSortInFormulaGroup
();
...
...
@@ -509,6 +510,7 @@ public:
CPPUNIT_TEST
(
testFindAreaPosColRight
);
CPPUNIT_TEST
(
testSort
);
CPPUNIT_TEST
(
testSortHorizontal
);
CPPUNIT_TEST
(
testSortSingleRow
);
CPPUNIT_TEST
(
testSortWithFormulaRefs
);
CPPUNIT_TEST
(
testSortWithStrings
);
CPPUNIT_TEST
(
testSortInFormulaGroup
);
...
...
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