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
01de2fc7
Kaydet (Commit)
01de2fc7
authored
Kas 20, 2015
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
unit test testMatrixConditionalBooleanResult
Change-Id: I6531a79b510da18b6799edd32d40cfce7dd2975a
üst
fd8c8025
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
ucalc.cxx
sc/qa/unit/ucalc.cxx
+25
-0
ucalc.hxx
sc/qa/unit/ucalc.hxx
+2
-0
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
01de2fc7
...
...
@@ -2033,6 +2033,31 @@ void Test::testMatrixComparisonWithErrors()
m_pDoc->DeleteTab(0);
}
void Test::testMatrixConditionalBooleanResult()
{
m_pDoc->InsertTab(0, "foo");
// Create matrix formulas in A1:B1,A2:B2,A3:B3,A4:B4 producing mixed
// boolean and numeric results in an unformatted area.
ScMarkData aMark;
aMark.SelectOneTable(0);
m_pDoc->InsertMatrixFormula( 0,0, 1,0, aMark, "=IF({1,0};TRUE();42)"); // {TRUE,42}
m_pDoc->InsertMatrixFormula( 0,1, 1,1, aMark, "=IF({0,1};TRUE();42)"); // {42,1} aim for {42,TRUE}
m_pDoc->InsertMatrixFormula( 0,2, 1,2, aMark, "=IF({1,0};42;FALSE())"); // {42,0} aim for {42,FALSE}
m_pDoc->InsertMatrixFormula( 0,3, 1,3, aMark, "=IF({0,1};42;FALSE())"); // {FALSE,42}
CPPUNIT_ASSERT_EQUAL( OUString("TRUE"), m_pDoc->GetString(0,0,0));
CPPUNIT_ASSERT_EQUAL( OUString("42"), m_pDoc->GetString(1,0,0));
CPPUNIT_ASSERT_EQUAL( OUString("42"), m_pDoc->GetString(0,1,0));
//CPPUNIT_ASSERT_EQUAL( OUString("TRUE"), m_pDoc->GetString(1,1,0)); // not yet
CPPUNIT_ASSERT_EQUAL( OUString("42"), m_pDoc->GetString(0,2,0));
//CPPUNIT_ASSERT_EQUAL( OUString("FALSE"), m_pDoc->GetString(1,2,0)); // not yet
CPPUNIT_ASSERT_EQUAL( OUString("FALSE"), m_pDoc->GetString(0,3,0));
CPPUNIT_ASSERT_EQUAL( OUString("42"), m_pDoc->GetString(1,3,0));
m_pDoc->DeleteTab(0);
}
void Test::testEnterMixedMatrix()
{
m_pDoc->InsertTab(0, "foo");
...
...
sc/qa/unit/ucalc.hxx
Dosyayı görüntüle @
01de2fc7
...
...
@@ -236,6 +236,7 @@ public:
void
testCSV
();
void
testMatrix
();
void
testMatrixComparisonWithErrors
();
void
testMatrixConditionalBooleanResult
();
void
testEnterMixedMatrix
();
void
testMatrixEditable
();
...
...
@@ -559,6 +560,7 @@ public:
CPPUNIT_TEST
(
testCSV
);
CPPUNIT_TEST
(
testMatrix
);
CPPUNIT_TEST
(
testMatrixComparisonWithErrors
);
CPPUNIT_TEST
(
testMatrixConditionalBooleanResult
);
CPPUNIT_TEST
(
testEnterMixedMatrix
);
CPPUNIT_TEST
(
testMatrixEditable
);
CPPUNIT_TEST
(
testPivotTable
);
...
...
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