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
667e0625
Kaydet (Commit)
667e0625
authored
May 20, 2017
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Unit test for SUBTOTAL MIN,MAX with array of references, tdf#58874
Change-Id: I116b236066f28e3442f644544e789e1dbc2ff88a
üst
c41b8220
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
ucalc_formula.cxx
sc/qa/unit/ucalc_formula.cxx
+21
-3
No files found.
sc/qa/unit/ucalc_formula.cxx
Dosyayı görüntüle @
667e0625
...
...
@@ -7922,11 +7922,29 @@ void Test::testFuncRefListArraySUBTOTAL()
aMark.SelectOneTable(0);
m_pDoc->InsertMatrixFormula(1, 6, 1, 8, aMark, "=SUBTOTAL(9;OFFSET(A1;ROW(1:3);0;2))");
ScAddress aPos(1,6,0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL for A2:A3 failed", 6.0, m_pDoc->GetValue(aPos));
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL
SUM
for A2:A3 failed", 6.0, m_pDoc->GetValue(aPos));
aPos.IncRow();
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL for A3:A4 failed", 12.0, m_pDoc->GetValue(aPos));
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL
SUM
for A3:A4 failed", 12.0, m_pDoc->GetValue(aPos));
aPos.IncRow();
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL for A4:A5 failed", 24.0, m_pDoc->GetValue(aPos));
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL SUM for A4:A5 failed", 24.0, m_pDoc->GetValue(aPos));
// Matrix in C7:C9, individual MIN of A2:A3, A3:A4 and A4:A5
m_pDoc->InsertMatrixFormula(2, 6, 2, 8, aMark, "=SUBTOTAL(5;OFFSET(A1;ROW(1:3);0;2))");
aPos.Set(2,6,0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MIN for A2:A3 failed", 2.0, m_pDoc->GetValue(aPos));
aPos.IncRow();
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MIN for A3:A4 failed", 4.0, m_pDoc->GetValue(aPos));
aPos.IncRow();
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MIN for A4:A5 failed", 8.0, m_pDoc->GetValue(aPos));
// Matrix in D7:D9, individual MAX of A2:A3, A3:A4 and A4:A5
m_pDoc->InsertMatrixFormula(3, 6, 3, 8, aMark, "=SUBTOTAL(4;OFFSET(A1;ROW(1:3);0;2))");
aPos.Set(3,6,0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MAX for A2:A3 failed", 4.0, m_pDoc->GetValue(aPos));
aPos.IncRow();
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MAX for A3:A4 failed", 8.0, m_pDoc->GetValue(aPos));
aPos.IncRow();
CPPUNIT_ASSERT_EQUAL_MESSAGE("SUBTOTAL MAX for A4:A5 failed", 16.0, m_pDoc->GetValue(aPos));
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