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
ff1b46c6
Kaydet (Commit)
ff1b46c6
authored
Nis 28, 2017
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:cppunitassertequals: test
Change-Id: I3357b7502fcf9a45095919157ca1530e10c14dd0
üst
73463243
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
67 additions
and
64 deletions
+67
-64
xelementaccess.cxx
test/source/container/xelementaccess.cxx
+1
-1
xindexaccess.cxx
test/source/container/xindexaccess.cxx
+2
-2
cellproperties.cxx
test/source/sheet/cellproperties.cxx
+2
-2
datapilotfield.cxx
test/source/sheet/datapilotfield.cxx
+9
-8
xdatabaserange.cxx
test/source/sheet/xdatabaserange.cxx
+6
-6
xdatapilotdescriptor.cxx
test/source/sheet/xdatapilotdescriptor.cxx
+6
-6
xdatapilottable.cxx
test/source/sheet/xdatapilottable.cxx
+3
-3
xdatapilottable2.cxx
test/source/sheet/xdatapilottable2.cxx
+8
-8
xnamedrange.cxx
test/source/sheet/xnamedrange.cxx
+12
-12
xnamedranges.cxx
test/source/sheet/xnamedranges.cxx
+10
-8
xsheetannotation.cxx
test/source/sheet/xsheetannotation.cxx
+5
-5
xspreadsheetdocument.cxx
test/source/sheet/xspreadsheetdocument.cxx
+1
-1
xspreadsheets2.cxx
test/source/sheet/xspreadsheets2.cxx
+1
-1
xsearchable.cxx
test/source/util/xsearchable.cxx
+1
-1
No files found.
test/source/container/xelementaccess.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -19,7 +19,7 @@ namespace apitest {
void
XElementAccess
::
testGetElementType
()
{
uno
::
Reference
<
container
::
XElementAccess
>
xElementAccess
(
init
(),
UNO_QUERY_THROW
);
CPPUNIT_ASSERT
(
xElementAccess
->
getElementType
()
==
maType
);
CPPUNIT_ASSERT
_EQUAL
(
maType
,
xElementAccess
->
getElementType
()
);
}
void
XElementAccess
::
testHasElements
()
...
...
test/source/container/xindexaccess.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -24,13 +24,13 @@ XIndexAccess::XIndexAccess(sal_Int32 nItems):
void
XIndexAccess
::
testGetCount
()
{
uno
::
Reference
<
container
::
XIndexAccess
>
xIndexAccess
(
init
(),
UNO_QUERY_THROW
);
CPPUNIT_ASSERT
(
mnItems
==
xIndexAccess
->
getCount
());
CPPUNIT_ASSERT
_EQUAL
(
mnItems
,
xIndexAccess
->
getCount
());
}
void
XIndexAccess
::
testGetByIndex
()
{
uno
::
Reference
<
container
::
XIndexAccess
>
xIndexAccess
(
init
(),
UNO_QUERY_THROW
);
CPPUNIT_ASSERT
(
mnItems
==
xIndexAccess
->
getCount
());
CPPUNIT_ASSERT
_EQUAL
(
mnItems
,
xIndexAccess
->
getCount
());
if
(
mnItems
>
0
)
{
...
...
test/source/sheet/cellproperties.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -35,7 +35,7 @@ void CellProperties::testVertJustify()
uno
::
Any
aVertJustifyControllValue
=
xCellRangeBase
->
getPropertyValue
(
aVertJustify
);
CPPUNIT_ASSERT
(
aVertJustifyControllValue
>>=
aValue
);
std
::
cout
<<
"New VertJustify value: "
<<
aValue
<<
std
::
endl
;
CPPUNIT_ASSERT_
MESSAGE
(
"value has not been changed"
,
aValue
==
3
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"value has not been changed"
,
sal_Int32
(
3
),
aValue
);
}
void
CellProperties
::
testRotateReference
()
...
...
@@ -53,7 +53,7 @@ void CellProperties::testRotateReference()
uno
::
Any
aRotateReferenceControllValue
=
xCellRangeBase
->
getPropertyValue
(
aRotateReference
);
CPPUNIT_ASSERT
(
aRotateReferenceControllValue
>>=
aValue
);
std
::
cout
<<
"New RotateReference value: "
<<
aValue
<<
std
::
endl
;
CPPUNIT_ASSERT_
MESSAGE
(
"value has not been changed"
,
aValue
==
3
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"value has not been changed"
,
sal_Int32
(
3
),
aValue
);
}
}
...
...
test/source/sheet/datapilotfield.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -46,8 +46,9 @@ void DataPilotField::testSortInfo()
sheet
::
DataPilotFieldSortInfo
aNewSortInfoValue
;
aValue
=
xPropSet
->
getPropertyValue
(
aSortInfo
);
CPPUNIT_ASSERT
(
aValue
>>=
aNewSortInfoValue
);
CPPUNIT_ASSERT_MESSAGE
(
"set value should be the same as got value"
,
aNewSortInfoValue
.
Field
==
aSortInfoValue
.
Field
&&
aNewSortInfoValue
.
Mode
==
aSortInfoValue
.
Mode
&&
aNewSortInfoValue
.
IsAscending
==
aSortInfoValue
.
IsAscending
);
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"set value should be the same as got value"
,
aSortInfoValue
.
Field
,
aNewSortInfoValue
.
Field
);
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"set value should be the same as got value"
,
aSortInfoValue
.
Mode
,
aNewSortInfoValue
.
Mode
);
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"set value should be the same as got value"
,
aSortInfoValue
.
IsAscending
,
aNewSortInfoValue
.
IsAscending
);
//setting HasSortInfo only makes sense for false, for true the uno implementation does nothing
bool
bHasSortInfo
(
false
);
...
...
@@ -79,8 +80,8 @@ void DataPilotField::testLayoutInfo()
sheet
::
DataPilotFieldLayoutInfo
aNewLayoutInfoValue
;
aValue
=
xPropSet
->
getPropertyValue
(
aLayoutInfo
);
CPPUNIT_ASSERT
(
aValue
>>=
aNewLayoutInfoValue
);
CPPUNIT_ASSERT_
MESSAGE
(
"set value should be the same as the got value"
,
aNewLayoutInfoValue
.
LayoutMode
==
aLayoutInfoValue
.
LayoutMode
&&
aNewLayoutInfoValue
.
AddEmptyLines
==
a
LayoutInfoValue
.
AddEmptyLines
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"set value should be the same as the got value"
,
aLayoutInfoValue
.
LayoutMode
,
aNewLayoutInfoValue
.
LayoutMode
);
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"set value should be the same as the got value"
,
aLayoutInfoValue
.
AddEmptyLines
,
aNew
LayoutInfoValue
.
AddEmptyLines
);
//setting HasLayoutInfo only makes sense for false, tor true the uno implementation does nothing
bool
bHasLayoutInfo
(
false
);
...
...
@@ -112,8 +113,8 @@ void DataPilotField::testAutoShowInfo()
sheet
::
DataPilotFieldAutoShowInfo
aNewAutoShowInfoValue
;
aValue
=
xPropSet
->
getPropertyValue
(
aAutoShowInfo
);
CPPUNIT_ASSERT
(
aValue
>>=
aNewAutoShowInfoValue
);
CPPUNIT_ASSERT_
MESSAGE
(
"set value should be the same as the got value"
,
aNewAutoShowInfoValue
.
DataField
==
aAutoShowInfoValue
.
DataField
&&
aNewAutoShowInfoValue
.
IsEnabled
==
a
AutoShowInfoValue
.
IsEnabled
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"set value should be the same as the got value"
,
aAutoShowInfoValue
.
DataField
,
aNewAutoShowInfoValue
.
DataField
);
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"set value should be the same as the got value"
,
aAutoShowInfoValue
.
IsEnabled
,
aNew
AutoShowInfoValue
.
IsEnabled
);
//setting HasLayoutInfo only makes sense for false, tor true the uno implementation does nothing
bool
bHasAutoShowInfo
(
false
);
...
...
@@ -145,8 +146,8 @@ void DataPilotField::testReference()
sheet
::
DataPilotFieldReference
aNewReferenceValue
;
aValue
=
xPropSet
->
getPropertyValue
(
aReference
);
CPPUNIT_ASSERT
(
aValue
>>=
aNewReferenceValue
);
CPPUNIT_ASSERT_
MESSAGE
(
"set value should be the same as the got value"
,
aReferenceValue
.
ReferenceField
==
aNewReferenceValue
.
ReferenceField
&&
aReferenceValue
.
ReferenceItemType
==
aNewReferenceValue
.
ReferenceItemType
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"set value should be the same as the got value"
,
aReferenceValue
.
ReferenceField
,
aNewReferenceValue
.
ReferenceField
);
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"set value should be the same as the got value"
,
aReferenceValue
.
ReferenceItemType
,
aNewReferenceValue
.
ReferenceItemType
);
//setting HasReference only makes sense for false, tor true the uno implementation does nothing
bool
bHasReference
(
false
);
...
...
test/source/sheet/xdatabaserange.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -48,11 +48,11 @@ void XDatabaseRange::testDataArea()
xDBRange
->
setDataArea
(
aCellAddress
);
table
::
CellRangeAddress
aValue
;
aValue
=
xDBRange
->
getDataArea
();
CPPUNIT_ASSERT
(
aCellAddress
.
Sheet
==
aValue
.
Sheet
);
CPPUNIT_ASSERT
(
aCellAddress
.
StartRow
==
aValue
.
StartRow
);
CPPUNIT_ASSERT
(
aCellAddress
.
EndRow
==
aValue
.
EndRow
);
CPPUNIT_ASSERT
(
aCellAddress
.
StartColumn
==
aValue
.
StartColumn
);
CPPUNIT_ASSERT
(
aCellAddress
.
EndColumn
==
aValue
.
EndColumn
);
CPPUNIT_ASSERT
_EQUAL
(
aCellAddress
.
Sheet
,
aValue
.
Sheet
);
CPPUNIT_ASSERT
_EQUAL
(
aCellAddress
.
StartRow
,
aValue
.
StartRow
);
CPPUNIT_ASSERT
_EQUAL
(
aCellAddress
.
EndRow
,
aValue
.
EndRow
);
CPPUNIT_ASSERT
_EQUAL
(
aCellAddress
.
StartColumn
,
aValue
.
StartColumn
);
CPPUNIT_ASSERT
_EQUAL
(
aCellAddress
.
EndColumn
,
aValue
.
EndColumn
);
}
void
XDatabaseRange
::
testGetSubtotalDescriptor
()
...
...
@@ -121,7 +121,7 @@ void XDatabaseRange::testGetSortDescriptor()
{
sal_Int32
nUserListIndex
=
1
;
aProp
.
Value
>>=
nUserListIndex
;
CPPUNIT_ASSERT
(
nUserListIndex
==
0
);
CPPUNIT_ASSERT
_EQUAL
(
sal_Int32
(
0
),
nUserListIndex
);
}
}
}
...
...
test/source/sheet/xdatapilotdescriptor.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -31,7 +31,7 @@ void XDataPilotDescriptor::testTag()
uno
::
Reference
<
sheet
::
XDataPilotDescriptor
>
xDescr
(
init
(),
UNO_QUERY_THROW
);
xDescr
->
setTag
(
aTag
);
OUString
aNewTag
=
xDescr
->
getTag
();
CPPUNIT_ASSERT
(
aTag
==
aNewTag
);
CPPUNIT_ASSERT
_EQUAL
(
aTag
,
aNewTag
);
}
void
XDataPilotDescriptor
::
testSourceRange
()
...
...
@@ -50,11 +50,11 @@ void XDataPilotDescriptor::testSourceRange()
table
::
CellRangeAddress
aReturn
;
aReturn
=
xDescr
->
getSourceRange
();
CPPUNIT_ASSERT
(
aAddress
.
Sheet
==
aReturn
.
Sheet
);
CPPUNIT_ASSERT
(
aAddress
.
StartColumn
==
aReturn
.
StartColumn
);
CPPUNIT_ASSERT
(
aAddress
.
StartRow
==
aReturn
.
StartRow
);
CPPUNIT_ASSERT
(
aAddress
.
EndColumn
==
aReturn
.
EndColumn
);
CPPUNIT_ASSERT
(
aAddress
.
EndRow
==
aReturn
.
EndRow
);
CPPUNIT_ASSERT
_EQUAL
(
aAddress
.
Sheet
,
aReturn
.
Sheet
);
CPPUNIT_ASSERT
_EQUAL
(
aAddress
.
StartColumn
,
aReturn
.
StartColumn
);
CPPUNIT_ASSERT
_EQUAL
(
aAddress
.
StartRow
,
aReturn
.
StartRow
);
CPPUNIT_ASSERT
_EQUAL
(
aAddress
.
EndColumn
,
aReturn
.
EndColumn
);
CPPUNIT_ASSERT
_EQUAL
(
aAddress
.
EndRow
,
aReturn
.
EndRow
);
//restore old settings
xDescr
->
setSourceRange
(
aOldAddress
);
...
...
test/source/sheet/xdatapilottable.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -31,9 +31,9 @@ void XDataPilotTable::testGetOutputRange()
uno
::
Reference
<
sheet
::
XDataPilotTable
>
xDPTable
(
init
(),
UNO_QUERY_THROW
);
table
::
CellRangeAddress
aRange
=
xDPTable
->
getOutputRange
();
CPPUNIT_ASSERT
(
aRange
.
Sheet
==
0
);
CPPUNIT_ASSERT
(
aRange
.
StartColumn
==
7
);
CPPUNIT_ASSERT
(
aRange
.
StartRow
==
8
);
CPPUNIT_ASSERT
_EQUAL
(
sal_Int16
(
0
),
aRange
.
Sheet
);
CPPUNIT_ASSERT
_EQUAL
(
sal_Int32
(
7
),
aRange
.
StartColumn
);
CPPUNIT_ASSERT
_EQUAL
(
sal_Int32
(
8
),
aRange
.
StartRow
);
}
void
XDataPilotTable
::
testRefresh
()
...
...
test/source/sheet/xdatapilottable2.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -127,17 +127,17 @@ void XDataPilotTable2::testGetOutputRangeByType()
CPPUNIT_ASSERT
(
maRangeWhole
.
EndRow
-
maRangeWhole
.
StartRow
>
0
);
//table range must be of equal width with the whole range, and the same bottom
CPPUNIT_ASSERT
(
maRangeTable
.
Sheet
==
maRangeWho
le
.
Sheet
);
CPPUNIT_ASSERT
(
maRangeTable
.
EndRow
==
maRangeWho
le
.
EndRow
);
CPPUNIT_ASSERT
(
maRangeTable
.
StartColumn
==
maRangeWho
le
.
StartColumn
);
CPPUNIT_ASSERT
(
maRangeTable
.
EndColumn
==
maRangeWho
le
.
EndColumn
);
CPPUNIT_ASSERT
_EQUAL
(
maRangeWhole
.
Sheet
,
maRangeTab
le
.
Sheet
);
CPPUNIT_ASSERT
_EQUAL
(
maRangeWhole
.
EndRow
,
maRangeTab
le
.
EndRow
);
CPPUNIT_ASSERT
_EQUAL
(
maRangeWhole
.
StartColumn
,
maRangeTab
le
.
StartColumn
);
CPPUNIT_ASSERT
_EQUAL
(
maRangeWhole
.
EndColumn
,
maRangeTab
le
.
EndColumn
);
//result range must be smaller than the table range, and must share the same lower-right corner
CPPUNIT_ASSERT
(
maRangeResult
.
Sheet
==
maRangeTable
.
Sheet
);
CPPUNIT_ASSERT
_EQUAL
(
maRangeTable
.
Sheet
,
maRangeResult
.
Sheet
);
CPPUNIT_ASSERT
(
maRangeResult
.
StartColumn
>=
maRangeTable
.
StartColumn
);
CPPUNIT_ASSERT
(
maRangeResult
.
StartRow
>=
maRangeTable
.
StartRow
);
CPPUNIT_ASSERT
(
maRangeResult
.
EndRow
==
maRangeTable
.
EndRow
);
CPPUNIT_ASSERT
(
maRangeResult
.
EndColumn
==
maRangeTable
.
EndColumn
);
CPPUNIT_ASSERT
_EQUAL
(
maRangeTable
.
EndRow
,
maRangeResult
.
EndRow
);
CPPUNIT_ASSERT
_EQUAL
(
maRangeTable
.
EndColumn
,
maRangeResult
.
EndColumn
);
}
...
...
@@ -269,7 +269,7 @@ bool XDataPilotTable2::checkDrillDownSheetContent(uno::Reference< sheet::XSpread
{
Any
&
aCell1
=
aSheetData
[
x
][
y
];
const
Any
&
aCell2
=
aData
[
x
][
y
];
CPPUNIT_ASSERT
(
aCell1
==
aCell2
);
CPPUNIT_ASSERT
_EQUAL
(
aCell2
,
aCell1
);
}
}
return
true
;
...
...
test/source/sheet/xnamedrange.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -71,7 +71,7 @@ void XNamedRange::testGetType()
{
OUString
aTestedNamedRangeString
(
"initial1"
);
uno
::
Reference
<
sheet
::
XNamedRange
>
xNamedRange
=
getNamedRange
(
aTestedNamedRangeString
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong expected Type"
,
xNamedRange
->
getType
()
==
0
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong expected Type"
,
sal_Int32
(
0
),
xNamedRange
->
getType
()
);
}
void
XNamedRange
::
testSetType
()
...
...
@@ -81,23 +81,23 @@ void XNamedRange::testSetType()
sal_Int32
nType
=
::
sheet
::
NamedRangeFlag
::
ROW_HEADER
;
xNamedRange
->
setType
(
nType
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong expected Type ROW_HEADER after setting it"
,
xNamedRange
->
getType
()
==
nType
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong expected Type ROW_HEADER after setting it"
,
nType
,
xNamedRange
->
getType
()
);
nType
=
::
sheet
::
NamedRangeFlag
::
COLUMN_HEADER
;
xNamedRange
->
setType
(
nType
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong expected Type COLUMN_HEADER after setting it"
,
xNamedRange
->
getType
()
==
nType
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong expected Type COLUMN_HEADER after setting it"
,
nType
,
xNamedRange
->
getType
()
);
nType
=
::
sheet
::
NamedRangeFlag
::
FILTER_CRITERIA
;
xNamedRange
->
setType
(
nType
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong expected Type FILTER_CRITERIA after setting it"
,
xNamedRange
->
getType
()
==
nType
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong expected Type FILTER_CRITERIA after setting it"
,
nType
,
xNamedRange
->
getType
()
);
nType
=
::
sheet
::
NamedRangeFlag
::
PRINT_AREA
;
xNamedRange
->
setType
(
nType
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong expected Type PRINT_AREA after setting it"
,
xNamedRange
->
getType
()
==
nType
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong expected Type PRINT_AREA after setting it"
,
nType
,
xNamedRange
->
getType
()
);
nType
=
0
;
xNamedRange
->
setType
(
nType
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong expected Type 0 after setting it"
,
xNamedRange
->
getType
()
==
nType
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong expected Type 0 after setting it"
,
nType
,
xNamedRange
->
getType
()
);
}
void
XNamedRange
::
testGetReferencePosition
()
...
...
@@ -107,9 +107,9 @@ void XNamedRange::testGetReferencePosition()
table
::
CellAddress
aCellAddress
=
xNamedRange
->
getReferencePosition
();
// the expected address is on B1, as it was the active cell when initial2 was created
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong SHEET reference position"
,
aCellAddress
.
Sheet
==
0
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong COLUMN reference position"
,
aCellAddress
.
Column
==
1
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong ROW reference position"
,
aCellAddress
.
Row
==
0
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong SHEET reference position"
,
sal_Int16
(
0
),
aCellAddress
.
Sheet
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong COLUMN reference position"
,
sal_Int32
(
1
),
aCellAddress
.
Column
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong ROW reference position"
,
sal_Int32
(
0
),
aCellAddress
.
Row
);
}
void
XNamedRange
::
testSetReferencePosition
()
...
...
@@ -122,9 +122,9 @@ void XNamedRange::testSetReferencePosition()
xNamedRange
->
setReferencePosition
(
aBaseAddress
);
table
::
CellAddress
aCellAddress
=
xNamedRange
->
getReferencePosition
();
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong SHEET reference position after setting it"
,
aCellAddress
.
Sheet
==
1
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong COLUMN reference position after setting it"
,
aCellAddress
.
Column
==
2
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong ROW reference position after setting it"
,
aCellAddress
.
Row
==
3
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong SHEET reference position after setting it"
,
sal_Int16
(
1
),
aCellAddress
.
Sheet
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong COLUMN reference position after setting it"
,
sal_Int32
(
2
),
aCellAddress
.
Column
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong ROW reference position after setting it"
,
sal_Int32
(
3
),
aCellAddress
.
Row
);
}
}
...
...
test/source/sheet/xnamedranges.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -120,10 +120,11 @@ void XNamedRanges::testAddNewFromTitles()
uno
::
Reference
<
sheet
::
XCellRangeAddressable
>
xCellRangeAdr
(
xCellRangeRef
->
getReferredCells
(),
UNO_QUERY_THROW
);
table
::
CellRangeAddress
cellRangeAddress
=
xCellRangeAdr
->
getRangeAddress
();
CPPUNIT_ASSERT
(
cellRangeAddress
.
EndColumn
==
i
&&
cellRangeAddress
.
StartColumn
==
i
);
CPPUNIT_ASSERT
(
cellRangeAddress
.
StartRow
==
1
);
CPPUNIT_ASSERT
(
cellRangeAddress
.
EndRow
==
3
);
CPPUNIT_ASSERT
(
cellRangeAddress
.
Sheet
==
1
);
CPPUNIT_ASSERT_EQUAL
(
i
,
cellRangeAddress
.
EndColumn
);
CPPUNIT_ASSERT_EQUAL
(
i
,
cellRangeAddress
.
StartColumn
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
1
),
cellRangeAddress
.
StartRow
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
3
),
cellRangeAddress
.
EndRow
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
1
),
cellRangeAddress
.
Sheet
);
}
xNamedRanges
->
addNewFromTitles
(
aCellRangeAddress
,
sheet
::
Border_LEFT
);
...
...
@@ -145,10 +146,11 @@ void XNamedRanges::testAddNewFromTitles()
uno
::
Reference
<
sheet
::
XCellRangeAddressable
>
xCellRangeAdr
(
xCellRangeRef
->
getReferredCells
(),
UNO_QUERY_THROW
);
table
::
CellRangeAddress
cellRangeAddress
=
xCellRangeAdr
->
getRangeAddress
();
CPPUNIT_ASSERT
(
cellRangeAddress
.
EndRow
==
i
&&
cellRangeAddress
.
StartRow
==
i
);
CPPUNIT_ASSERT
(
cellRangeAddress
.
StartColumn
==
1
);
CPPUNIT_ASSERT
(
cellRangeAddress
.
EndColumn
==
3
);
CPPUNIT_ASSERT
(
cellRangeAddress
.
Sheet
==
1
);
CPPUNIT_ASSERT_EQUAL
(
i
,
cellRangeAddress
.
EndRow
);
CPPUNIT_ASSERT_EQUAL
(
i
,
cellRangeAddress
.
StartRow
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
1
),
cellRangeAddress
.
StartColumn
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int32
(
3
),
cellRangeAddress
.
EndColumn
);
CPPUNIT_ASSERT_EQUAL
(
sal_Int16
(
1
),
cellRangeAddress
.
Sheet
);
}
}
...
...
test/source/sheet/xsheetannotation.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -30,9 +30,9 @@ void XSheetAnnotation::testGetPosition()
aExpectedCellAddress
.
Row
=
1
;
aExpectedCellAddress
.
Column
=
2
;
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong SHEET reference position"
,
aResultCellAddress
.
Sheet
==
aExpected
CellAddress
.
Sheet
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong COLUMN reference position"
,
aResultCellAddress
.
Column
==
aExpected
CellAddress
.
Column
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong ROW reference position"
,
aResultCellAddress
.
Row
==
aExpected
CellAddress
.
Row
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong SHEET reference position"
,
aExpectedCellAddress
.
Sheet
,
aResult
CellAddress
.
Sheet
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong COLUMN reference position"
,
aExpectedCellAddress
.
Column
,
aResult
CellAddress
.
Column
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong ROW reference position"
,
aExpectedCellAddress
.
Row
,
aResult
CellAddress
.
Row
);
}
void
XSheetAnnotation
::
testGetAuthor
()
...
...
@@ -40,14 +40,14 @@ void XSheetAnnotation::testGetAuthor()
uno
::
Reference
<
sheet
::
XSheetAnnotation
>
aSheetAnnotation
(
init
(),
UNO_QUERY_THROW
);
OUString
aAuthor
=
aSheetAnnotation
->
getAuthor
();
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong author"
,
aAuthor
==
"LG"
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong author"
,
OUString
(
"LG"
),
aAuthor
);
}
void
XSheetAnnotation
::
testGetDate
()
{
uno
::
Reference
<
sheet
::
XSheetAnnotation
>
aSheetAnnotation
(
init
(),
UNO_QUERY_THROW
);
OUString
aDate
=
aSheetAnnotation
->
getDate
();
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong date"
,
aDate
==
"01/17/2013"
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong date"
,
OUString
(
"01/17/2013"
),
aDate
);
}
void
XSheetAnnotation
::
testGetIsVisible
()
{
...
...
test/source/sheet/xspreadsheetdocument.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -25,7 +25,7 @@ void XSpreadsheetDocument::testGetSheets()
CPPUNIT_ASSERT
(
xSheets
.
is
());
uno
::
Reference
<
container
::
XIndexAccess
>
xIA
(
xSheets
,
UNO_QUERY_THROW
);
CPPUNIT_ASSERT
(
xIA
->
getCount
()
==
mnSheets
);
CPPUNIT_ASSERT
_EQUAL
(
mnSheets
,
xIA
->
getCount
()
);
}
}
...
...
test/source/sheet/xspreadsheets2.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -275,7 +275,7 @@ void XSpreadsheets2::testImportCellStyle()
sal_Int32
aVertJustify
=
0
;
CPPUNIT_ASSERT
(
xCellStyleProp
->
getPropertyValue
(
aProperty
)
>>=
aVertJustify
);
CPPUNIT_ASSERT_
MESSAGE
(
"New style: VertJustify not set"
,
(
table
::
CellVertJustify
)
aVertJustify
==
table
::
CellVertJustify_CENTER
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"New style: VertJustify not set"
,
table
::
CellVertJustify_CENTER
,
(
table
::
CellVertJustify
)
aVertJustify
);
}
uno
::
Reference
<
sheet
::
XSpreadsheetDocument
>
XSpreadsheets2
::
getDoc
(
const
OUString
&
aFileBase
,
uno
::
Reference
<
lang
::
XComponent
>&
xComp
)
...
...
test/source/util/xsearchable.cxx
Dosyayı görüntüle @
ff1b46c6
...
...
@@ -27,7 +27,7 @@ void XSearchable::testFindAll()
uno
::
Reference
<
container
::
XIndexAccess
>
xIndex
=
xSearchable
->
findAll
(
xSearchDescr
);
CPPUNIT_ASSERT
(
xIndex
.
is
());
CPPUNIT_ASSERT
(
xIndex
->
getCount
()
==
mnCount
);
CPPUNIT_ASSERT
_EQUAL
(
mnCount
,
xIndex
->
getCount
()
);
}
void
XSearchable
::
testFindFirst
()
...
...
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