summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-09-19 09:12:00 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-09-19 09:13:26 -0400
commit8af25862f1782ff1fb0f66415e3a2d624f61d737 (patch)
treea8bcefcd3a816d4921f6ccc205f24bee3e76a7f7
parent5fd4679e7b92f344ea867e0dca1fc4c9363ae2cd (diff)
fdo#84009: Adjust the test case to catch this.
Change-Id: I16bdc6760276b5bc0c78c3693d3f92c68ef67ed1
-rw-r--r--sc/qa/unit/ucalc_sort.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx
index 95a5e4237b1c..f81a39433c18 100644
--- a/sc/qa/unit/ucalc_sort.cxx
+++ b/sc/qa/unit/ucalc_sort.cxx
@@ -1320,6 +1320,7 @@ void Test::testSortRefUpdate5()
void Test::testSortOutOfPlaceResult()
{
m_pDoc->InsertTab(0, "Sort");
+ m_pDoc->InsertTab(1, "Result");
const char* pData[] = {
"Header",
@@ -1356,7 +1357,7 @@ void Test::testSortOutOfPlaceResult()
aSortData.nRow2 = 5;
aSortData.bHasHeader = true;
aSortData.bInplace = false;
- aSortData.nDestTab = 0;
+ aSortData.nDestTab = 1;
aSortData.nDestCol = 2;
aSortData.nDestRow = 1;
aSortData.maKeyState[0].bDoSort = true;
@@ -1373,14 +1374,15 @@ void Test::testSortOutOfPlaceResult()
CPPUNIT_ASSERT_EQUAL( 9.0, m_pDoc->GetValue(ScAddress(0,4,0)));
CPPUNIT_ASSERT_EQUAL(-2.0, m_pDoc->GetValue(ScAddress(0,5,0)));
- // Sort result in C2:C7.
- CPPUNIT_ASSERT_EQUAL(OUString("Header"), m_pDoc->GetString(ScAddress(2,1,0)));
- CPPUNIT_ASSERT_EQUAL(-2.0, m_pDoc->GetValue(ScAddress(2,2,0)));
- CPPUNIT_ASSERT_EQUAL( 1.0, m_pDoc->GetValue(ScAddress(2,3,0)));
- CPPUNIT_ASSERT_EQUAL( 2.0, m_pDoc->GetValue(ScAddress(2,4,0)));
- CPPUNIT_ASSERT_EQUAL( 9.0, m_pDoc->GetValue(ScAddress(2,5,0)));
- CPPUNIT_ASSERT_EQUAL(23.0, m_pDoc->GetValue(ScAddress(2,6,0)));
+ // Sort result in C2:C7 on sheet "Result".
+ CPPUNIT_ASSERT_EQUAL(OUString("Header"), m_pDoc->GetString(ScAddress(2,1,1)));
+ CPPUNIT_ASSERT_EQUAL(-2.0, m_pDoc->GetValue(ScAddress(2,2,1)));
+ CPPUNIT_ASSERT_EQUAL( 1.0, m_pDoc->GetValue(ScAddress(2,3,1)));
+ CPPUNIT_ASSERT_EQUAL( 2.0, m_pDoc->GetValue(ScAddress(2,4,1)));
+ CPPUNIT_ASSERT_EQUAL( 9.0, m_pDoc->GetValue(ScAddress(2,5,1)));
+ CPPUNIT_ASSERT_EQUAL(23.0, m_pDoc->GetValue(ScAddress(2,6,1)));
+ m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
}