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
b13550ed
Kaydet (Commit)
b13550ed
authored
Mar 19, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Unit test for formula token array vectorization state.
Change-Id: I91dce36e56d86899ba506beb29df6188f10966c0
üst
307b9bfd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
ucalc.cxx
sc/qa/unit/ucalc.cxx
+34
-0
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
b13550ed
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
#include "calcconfig.hxx"
#include "calcconfig.hxx"
#include "interpre.hxx"
#include "interpre.hxx"
#include "columniterator.hxx"
#include "columniterator.hxx"
#include "types.hxx"
#include "formula/IFunctionDescription.hxx"
#include "formula/IFunctionDescription.hxx"
...
@@ -1203,6 +1204,8 @@ void Test::testFormulaHashAndTag()
...
@@ -1203,6 +1204,8 @@ void Test::testFormulaHashAndTag()
ScAddress
aPos1
(
0
,
0
,
0
),
aPos2
(
1
,
0
,
0
);
ScAddress
aPos1
(
0
,
0
,
0
),
aPos2
(
1
,
0
,
0
);
// Test formula hashing.
struct
{
struct
{
const
char
*
pFormula1
;
const
char
*
pFormula2
;
bool
bEqual
;
const
char
*
pFormula1
;
const
char
*
pFormula2
;
bool
bEqual
;
}
aHashTests
[]
=
{
}
aHashTests
[]
=
{
...
@@ -1245,6 +1248,37 @@ void Test::testFormulaHashAndTag()
...
@@ -1245,6 +1248,37 @@ void Test::testFormulaHashAndTag()
aPos2
.
IncRow
();
aPos2
.
IncRow
();
}
}
// Go back to row 1.
aPos1
.
SetRow
(
0
);
aPos2
.
SetRow
(
0
);
// Test formula vectorization state.
struct
{
const
char
*
pFormula
;
ScFormulaVectorState
eState
;
}
aVectorTests
[]
=
{
{
"=SUM(1;2;3;4;5)"
,
FormulaVectorEnabled
},
{
"=NOW()"
,
FormulaVectorDisabled
},
{
"=AVERAGE(X1:Y200)"
,
FormulaVectorCheckReference
},
{
"=MAX(X1:Y200;10;20)"
,
FormulaVectorCheckReference
},
{
"=MIN(10;11;22)"
,
FormulaVectorEnabled
},
{
"=H4"
,
FormulaVectorCheckReference
},
};
for
(
size_t
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aVectorTests
);
++
i
)
{
m_pDoc
->
SetString
(
aPos1
,
OUString
::
createFromAscii
(
aVectorTests
[
i
].
pFormula
));
ScFormulaVectorState
eState
=
m_pDoc
->
GetFormulaVectorState
(
aPos1
);
if
(
eState
!=
aVectorTests
[
i
].
eState
)
{
std
::
ostringstream
os
;
os
<<
"Unexpected vectorization state: expr:"
<<
aVectorTests
[
i
].
pFormula
;
CPPUNIT_ASSERT_MESSAGE
(
os
.
str
().
c_str
(),
false
);
}
aPos1
.
IncRow
();
}
m_pDoc
->
DeleteTab
(
0
);
m_pDoc
->
DeleteTab
(
0
);
}
}
...
...
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