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
e9a9adf0
Kaydet (Commit)
e9a9adf0
authored
Nis 29, 2014
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add unit test for fdo#77984
Change-Id: Iab081d779a959c9ebe8a2721b146ebe0b3e97099
üst
03e771f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
ucalc.cxx
sc/qa/unit/ucalc.cxx
+38
-0
ucalc.hxx
sc/qa/unit/ucalc.hxx
+2
-0
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
e9a9adf0
...
...
@@ -46,6 +46,8 @@
#include "columniterator.hxx"
#include "types.hxx"
#include "conditio.hxx"
#include "colorscale.hxx"
#include "fillinfo.hxx"
#include "globstr.hrc"
#include "tokenarray.hxx"
#include "scopetools.hxx"
...
...
@@ -5728,6 +5730,42 @@ void Test::testCondCopyPaste()
m_pDoc
->
DeleteTab
(
0
);
}
void
Test
::
testIconSet
()
{
m_pDoc
->
InsertTab
(
0
,
"Test"
);
ScConditionalFormatList
*
pList
=
m_pDoc
->
GetCondFormList
(
0
);
ScConditionalFormat
*
pFormat
=
new
ScConditionalFormat
(
1
,
m_pDoc
);
ScRangeList
aRangeList
(
ScRange
(
0
,
0
,
0
,
0
,
0
,
0
));
pFormat
->
AddRange
(
aRangeList
);
ScIconSetFormat
*
pEntry
=
new
ScIconSetFormat
(
m_pDoc
);
ScIconSetFormatData
*
pData
=
new
ScIconSetFormatData
;
pData
->
maEntries
.
push_back
(
new
ScColorScaleEntry
(
0
,
COL_BLUE
));
pData
->
maEntries
.
push_back
(
new
ScColorScaleEntry
(
1
,
COL_GREEN
));
pData
->
maEntries
.
push_back
(
new
ScColorScaleEntry
(
2
,
COL_RED
));
pEntry
->
SetIconSetData
(
pData
);
m_pDoc
->
AddCondFormatData
(
pFormat
->
GetRange
(),
0
,
1
);
pList
->
InsertNew
(
pFormat
);
struct
{
double
nVal
;
sal_Int32
nIndex
;
}
aTests
[]
=
{
{
-
1.0
,
0
},
{
0.0
,
0
},
{
1.0
,
1
},
{
2.0
,
2
},
{
3.0
,
2
}
};
for
(
size_t
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aTests
);
++
i
)
{
m_pDoc
->
SetValue
(
0
,
0
,
0
,
aTests
[
i
].
nVal
);
ScIconSetInfo
*
pInfo
=
pEntry
->
GetIconSetInfo
(
ScAddress
(
0
,
0
,
0
));
CPPUNIT_ASSERT_EQUAL
(
aTests
[
i
].
nIndex
,
pInfo
->
nIconIndex
);
}
}
void
Test
::
testImportStream
()
{
sc
::
AutoCalcSwitch
aAC
(
*
m_pDoc
,
true
);
// turn on auto calc.
...
...
sc/qa/unit/ucalc.hxx
Dosyayı görüntüle @
e9a9adf0
...
...
@@ -341,6 +341,7 @@ public:
void
testCondFormatInsertRow
();
void
testCondFormatInsertCol
();
void
testCondCopyPaste
();
void
testIconSet
();
void
testImportStream
();
void
testDeleteContents
();
...
...
@@ -494,6 +495,7 @@ public:
CPPUNIT_TEST
(
testCondFormatInsertRow
);
CPPUNIT_TEST
(
testCondFormatInsertCol
);
CPPUNIT_TEST
(
testCondCopyPaste
);
CPPUNIT_TEST
(
testIconSet
);
CPPUNIT_TEST
(
testImportStream
);
CPPUNIT_TEST
(
testDeleteContents
);
CPPUNIT_TEST
(
testTransliterateText
);
...
...
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