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
75b4d17f
Kaydet (Commit)
75b4d17f
authored
Şub 12, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use better assertion macros
üst
00b070ff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
macros-test.cxx
dbaccess/qa/extras/macros-test.cxx
+1
-1
macros-test.cxx
sc/qa/extras/macros-test.cxx
+2
-2
xnamedranges.cxx
test/source/sheet/xnamedranges.cxx
+1
-1
xspreadsheets2.cxx
test/source/sheet/xspreadsheets2.cxx
+10
-10
No files found.
dbaccess/qa/extras/macros-test.cxx
Dosyayı görüntüle @
75b4d17f
...
...
@@ -99,7 +99,7 @@ void DBAccessTest::setUp()
// which is a private symbol to us, gets called
mxDesktop
=
Reference
<
com
::
sun
::
star
::
frame
::
XDesktop
>
(
getMultiServiceFactory
()
->
createInstance
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.Desktop"
))),
UNO_QUERY
);
CPPUNIT_ASSERT
_MESSAGE
(
""
,
mxDesktop
.
is
());
CPPUNIT_ASSERT
(
mxDesktop
.
is
());
}
void
DBAccessTest
::
tearDown
()
...
...
sc/qa/extras/macros-test.cxx
Dosyayı görüntüle @
75b4d17f
...
...
@@ -141,7 +141,7 @@ void ScMacrosTest::testStarBasic()
double
aValue
;
pDoc
->
GetValue
(
0
,
0
,
0
,
aValue
);
std
::
cout
<<
"returned value = "
<<
aValue
<<
std
::
endl
;
CPPUNIT_ASSERT_
MESSAGE
(
"script did not change the value of Sheet1.A1"
,
aValue
==
2
);
CPPUNIT_ASSERT_
DOUBLES_EQUAL_MESSAGE
(
"script did not change the value of Sheet1.A1"
,
2.0
,
aValue
,
0.00001
);
xDocSh
->
DoClose
();
}
...
...
@@ -207,7 +207,7 @@ void ScMacrosTest::setUp()
CPPUNIT_ASSERT_MESSAGE
(
"no calc component!"
,
m_xCalcComponent
.
is
());
mxDesktop
=
Reference
<
com
::
sun
::
star
::
frame
::
XDesktop
>
(
getMultiServiceFactory
()
->
createInstance
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.frame.Desktop"
))),
UNO_QUERY
);
CPPUNIT_ASSERT
_MESSAGE
(
""
,
mxDesktop
.
is
());
CPPUNIT_ASSERT
(
mxDesktop
.
is
());
}
void
ScMacrosTest
::
tearDown
()
...
...
test/source/sheet/xnamedranges.cxx
Dosyayı görüntüle @
75b4d17f
...
...
@@ -180,7 +180,7 @@ void XNamedRanges::testRemoveByName()
sal_Int32
nInitialCount
=
xIndex
->
getCount
();
xNamedRanges
->
removeByName
(
maNameToRemove
);
sal_Int32
nNewCount
=
xIndex
->
getCount
();
CPPUNIT_ASSERT_
MESSAGE
(
"NamedRange initial1 not removed"
,
nNewCount
==
nInitialCount
-
1
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"NamedRange initial1 not removed"
,
nNewCount
,
nInitialCount
-
1
);
CPPUNIT_ASSERT_MESSAGE
(
"Wrong NamedRange removed, initial1 still present"
,
!
xNamedRanges
->
hasByName
(
maNameToRemove
));
// try to remove non existing
rtl
::
OUString
aNr2
(
RTL_CONSTASCII_USTRINGPARAM
(
"dummyNonExistingNamedRange"
));
...
...
test/source/sheet/xspreadsheets2.cxx
Dosyayı görüntüle @
75b4d17f
...
...
@@ -92,7 +92,7 @@ void XSpreadsheets2::testImportString()
uno
::
Reference
<
text
::
XTextRange
>
xDestTextRange
(
xDestCell
,
UNO_QUERY_THROW
);
rtl
::
OUString
aDestString
=
xDestTextRange
->
getString
();
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong string imported"
,
aDestString
.
equals
(
aSrcString
)
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong string imported"
,
aDestString
,
aSrcString
);
}
void
XSpreadsheets2
::
testImportValue
()
...
...
@@ -108,7 +108,7 @@ void XSpreadsheets2::testImportValue()
uno
::
Reference
<
table
::
XCell
>
xDestCell
=
xDestSheet
->
getCellByPosition
(
1
,
0
);
sal_Int32
aDestValue
=
xDestCell
->
getValue
();
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong value imported"
,
aSrcValue
==
aDestValue
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong value imported"
,
aSrcValue
,
aDestValue
);
}
void
XSpreadsheets2
::
testImportFormulaBasicMath
()
...
...
@@ -126,7 +126,7 @@ void XSpreadsheets2::testImportFormulaBasicMath()
// potential problem later: formulas might be adjusted
// add some tests that the formulas are correctly adjusted
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong formula imported"
,
aDestFormula
.
equals
(
aSrcFormula
)
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong formula imported"
,
aDestFormula
,
aSrcFormula
);
}
void
XSpreadsheets2
::
testImportFormulaWithNamedRange
()
...
...
@@ -142,7 +142,7 @@ void XSpreadsheets2::testImportFormulaWithNamedRange()
uno
::
Reference
<
table
::
XCell
>
xDestCell
=
xDestSheet
->
getCellByPosition
(
3
,
0
);
rtl
::
OUString
aDestFormula
=
xDestCell
->
getFormula
();
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong Namedrange formula imported"
,
aDestFormula
.
equals
(
aSrcFormula
)
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong Namedrange formula imported"
,
aDestFormula
,
aSrcFormula
);
}
void
XSpreadsheets2
::
testImportOverExistingNamedRange
()
...
...
@@ -166,7 +166,7 @@ void XSpreadsheets2::testImportOverExistingNamedRange()
rtl
::
OUString
aExpectedContent
(
RTL_CONSTASCII_USTRINGPARAM
(
"$Sheet1.$B$1"
));
std
::
cout
<<
"testImportSheet : initial1 aNrDestContent "
<<
aNrDestContent
<<
std
::
endl
;
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong address for initial1"
,
aNrDestContent
.
equals
(
aExpectedContent
)
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong address for initial1"
,
aNrDestContent
,
aExpectedContent
);
}
...
...
@@ -191,7 +191,7 @@ void XSpreadsheets2::testImportNamedRangeDefinedInSource()
std
::
cout
<<
"testImportSheet : InSheetRangeName content "
<<
aNewInSheetNrDestContent
<<
std
::
endl
;
std
::
cout
<<
"testImportSheet : InSheetRangeName expected "
<<
aNewInSheetExpectedContent
<<
std
::
endl
;
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong address for InSheetRangeName"
,
aNewInSheetNrDestContent
.
equals
(
aNewInSheetExpectedContent
)
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong address for InSheetRangeName"
,
aNewInSheetNrDestContent
,
aNewInSheetExpectedContent
);
}
void
XSpreadsheets2
::
testImportNamedRangeRedefinedInSource
()
...
...
@@ -213,7 +213,7 @@ void XSpreadsheets2::testImportNamedRangeRedefinedInSource()
rtl
::
OUString
aRedefinedInSheetNrDestContent
=
xDestRedefinedInSheetNamedRange
->
getContent
();
rtl
::
OUString
aRedefinedInSheetExpectedContent
(
RTL_CONSTASCII_USTRINGPARAM
(
"$Sheet1.$B$2"
));
std
::
cout
<<
"testImportSheet : initial2 content "
<<
aRedefinedInSheetNrDestContent
<<
std
::
endl
;
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong address for Redefined InSheet named range"
,
aRedefinedInSheetNrDestContent
.
equals
(
aRedefinedInSheetExpectedContent
)
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong address for Redefined InSheet named range"
,
aRedefinedInSheetNrDestContent
,
aRedefinedInSheetExpectedContent
);
}
void
XSpreadsheets2
::
testImportNewNamedRange
()
...
...
@@ -267,7 +267,7 @@ void XSpreadsheets2::testImportCellStyle()
rtl
::
OUString
aDestStyleName
;
CPPUNIT_ASSERT
(
xDestCellPropSet
->
getPropertyValue
(
aCellProperty
)
>>=
aDestStyleName
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong imported Cell Style"
,
aDestStyleName
.
equals
(
aSrcStyleName
)
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"Wrong imported Cell Style"
,
aDestStyleName
,
aSrcStyleName
);
uno
::
Reference
<
style
::
XStyleFamiliesSupplier
>
xFamiliesSupplier
(
xDestDoc
,
UNO_QUERY_THROW
);
uno
::
Reference
<
container
::
XNameAccess
>
xFamiliesNameAccess
(
xFamiliesSupplier
->
getStyleFamilies
(),
UNO_QUERY_THROW
);
...
...
@@ -283,7 +283,7 @@ void XSpreadsheets2::testImportCellStyle()
sal_Int32
aVertJustify
=
0
;
CPPUNIT_ASSERT
(
xCellStyleProp
->
getPropertyValue
(
aProperty
)
>>=
aVertJustify
);
CPPUNIT_ASSERT_
MESSAGE
(
"New style: VertJustify not set"
,
aVertJustify
==
table
::
CellVertJustify_CENTER
);
CPPUNIT_ASSERT_
EQUAL_MESSAGE
(
"New style: VertJustify not set"
,
aVertJustify
,
table
::
CellVertJustify_CENTER
);
}
uno
::
Reference
<
sheet
::
XSpreadsheetDocument
>
XSpreadsheets2
::
getDoc
(
const
rtl
::
OUString
&
aFileBase
,
uno
::
Reference
<
lang
::
XComponent
>&
xComp
)
...
...
@@ -326,7 +326,7 @@ void XSpreadsheets2::importSheetToCopy()
uno
::
Reference
<
sheet
::
XSpreadsheets2
>
xDestSheets
(
xDestDoc
->
getSheets
(),
UNO_QUERY_THROW
);
sal_Int32
nDestPos
=
0
;
sal_Int32
nDestPosEffective
=
xDestSheets
->
importSheet
(
xDocument
,
aSrcSheetName
,
nDestPos
);
CPPUNIT_ASSERT_
MESSAGE
(
"Wrong sheet index"
,
nDestPosEffective
==
nDestPos
);
CPPUNIT_ASSERT_
EQUALS_MESSAGE
(
"Wrong sheet index"
,
nDestPosEffective
,
nDestPos
);
}
else
{
...
...
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