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
6437313b
Kaydet (Commit)
6437313b
authored
Şub 07, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#74507: Write test for this to induce the crash during unit test run.
Change-Id: Ib25136c203f7da17a9b7f086916d870225bc729b
üst
850d1b78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
ucalc.cxx
sc/qa/unit/ucalc.cxx
+37
-0
ucalc.hxx
sc/qa/unit/ucalc.hxx
+2
-0
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
6437313b
...
...
@@ -56,6 +56,7 @@
#include <asciiopt.hxx>
#include <impex.hxx>
#include <columnspanset.hxx>
#include <docoptio.hxx>
#include "formula/IFunctionDescription.hxx"
...
...
@@ -1189,6 +1190,42 @@ void Test::testHorizontalIterator()
m_pDoc->DeleteTab(0);
}
void Test::testValueIterator()
{
m_pDoc->InsertTab(0, "Test");
// Turn on "precision as shown" option.
ScDocOptions aOpt = m_pDoc->GetDocOptions();
aOpt.SetCalcAsShown(true);
m_pDoc->SetDocOptions(aOpt);
// Purely horizontal data layout with numeric data.
for (SCCOL i = 1; i <= 3; ++i)
m_pDoc->SetValue(ScAddress(i,2,0), i);
double fVal;
sal_uInt16 nErr;
{
const double aChecks[] = { 1.0, 2.0, 3.0 };
size_t nCheckLen = SAL_N_ELEMENTS(aChecks);
ScValueIterator aIter(m_pDoc, ScRange(1,2,0,3,2,0));
bool bHas = false;
size_t nCheckPos = 0;
for (bHas = aIter.GetFirst(fVal, nErr); bHas; bHas = aIter.GetNext(fVal, nErr), ++nCheckPos)
{
CPPUNIT_ASSERT_MESSAGE("Iteration longer than expected.", nCheckPos < nCheckLen);
CPPUNIT_ASSERT_EQUAL(aChecks[nCheckPos], fVal);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(0), nErr);
}
}
m_pDoc->DeleteTab(0);
}
void Test::testFormulaDepTracking()
{
CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet", m_pDoc->InsertTab (0, "foo"));
...
...
sc/qa/unit/ucalc.hxx
Dosyayı görüntüle @
6437313b
...
...
@@ -137,6 +137,7 @@ public:
void
testVolatileFunc
();
void
testHorizontalIterator
();
void
testValueIterator
();
/**
* Basic test for formula dependency tracking.
...
...
@@ -361,6 +362,7 @@ public:
CPPUNIT_TEST
(
testSheetsFunc
);
CPPUNIT_TEST
(
testVolatileFunc
);
CPPUNIT_TEST
(
testHorizontalIterator
);
CPPUNIT_TEST
(
testValueIterator
);
CPPUNIT_TEST
(
testFormulaDepTracking
);
CPPUNIT_TEST
(
testFormulaDepTracking2
);
CPPUNIT_TEST
(
testCellBroadcaster
);
...
...
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