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
1f742c52
Kaydet (Commit)
1f742c52
authored
Nis 15, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Properly #ifdef some per-platform test code
Change-Id: I286fb35e223f205ecc649aa388471ef1b0823d86
üst
78fcb7f2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
0 deletions
+31
-0
macros-test.cxx
sc/qa/extras/macros-test.cxx
+6
-0
subsequent_export-test.cxx
sc/qa/unit/subsequent_export-test.cxx
+8
-0
subsequent_filters-test.cxx
sc/qa/unit/subsequent_filters-test.cxx
+7
-0
macros-test.cxx
sw/qa/core/macros-test.cxx
+8
-0
rtfimport.cxx
sw/qa/extras/rtfimport/rtfimport.cxx
+2
-0
No files found.
sc/qa/extras/macros-test.cxx
Dosyayı görüntüle @
1f742c52
...
@@ -36,9 +36,11 @@ class ScMacrosTest : public UnoApiTest
...
@@ -36,9 +36,11 @@ class ScMacrosTest : public UnoApiTest
public
:
public
:
ScMacrosTest
();
ScMacrosTest
();
#if !defined MACOSX
void
testStarBasic
();
void
testStarBasic
();
void
testVba
();
void
testVba
();
void
testMSP
();
void
testMSP
();
#endif
CPPUNIT_TEST_SUITE
(
ScMacrosTest
);
CPPUNIT_TEST_SUITE
(
ScMacrosTest
);
#if !defined(MACOSX)
#if !defined(MACOSX)
//enable this test if you want to play with star basic macros in unit tests
//enable this test if you want to play with star basic macros in unit tests
...
@@ -54,6 +56,8 @@ private:
...
@@ -54,6 +56,8 @@ private:
uno
::
Reference
<
uno
::
XInterface
>
m_xCalcComponent
;
uno
::
Reference
<
uno
::
XInterface
>
m_xCalcComponent
;
};
};
#if !defined MACOSX
// I suppose you could say this test doesn't really belong here, OTOH
// I suppose you could say this test doesn't really belong here, OTOH
// we need a full document to run the test ( it related originally to an
// we need a full document to run the test ( it related originally to an
// imported Excel VBA macro ) It's convenient and fast to unit test
// imported Excel VBA macro ) It's convenient and fast to unit test
...
@@ -276,6 +280,8 @@ void ScMacrosTest::testVba()
...
@@ -276,6 +280,8 @@ void ScMacrosTest::testVba()
}
}
}
}
#endif
ScMacrosTest
::
ScMacrosTest
()
ScMacrosTest
::
ScMacrosTest
()
:
UnoApiTest
(
"/sc/qa/extras/testdocuments"
)
:
UnoApiTest
(
"/sc/qa/extras/testdocuments"
)
{
{
...
...
sc/qa/unit/subsequent_export-test.cxx
Dosyayı görüntüle @
1f742c52
...
@@ -59,10 +59,14 @@ public:
...
@@ -59,10 +59,14 @@ public:
virtual
void
setUp
()
SAL_OVERRIDE
;
virtual
void
setUp
()
SAL_OVERRIDE
;
virtual
void
tearDown
()
SAL_OVERRIDE
;
virtual
void
tearDown
()
SAL_OVERRIDE
;
#if !defined MACOSX && !defined DRAGONFLY
ScDocShellRef
saveAndReloadPassword
(
ScDocShell
*
,
const
OUString
&
,
const
OUString
&
,
const
OUString
&
,
sal_uLong
);
ScDocShellRef
saveAndReloadPassword
(
ScDocShell
*
,
const
OUString
&
,
const
OUString
&
,
const
OUString
&
,
sal_uLong
);
#endif
void
test
();
void
test
();
#if !defined MACOSX && !defined DRAGONFLY
void
testPasswordExport
();
void
testPasswordExport
();
#endif
void
testConditionalFormatExportODS
();
void
testConditionalFormatExportODS
();
void
testConditionalFormatExportXLSX
();
void
testConditionalFormatExportXLSX
();
void
testColorScaleExportODS
();
void
testColorScaleExportODS
();
...
@@ -132,6 +136,7 @@ private:
...
@@ -132,6 +136,7 @@ private:
};
};
#if !defined MACOSX && !defined DRAGONFLY
ScDocShellRef
ScExportTest
::
saveAndReloadPassword
(
ScDocShell
*
pShell
,
const
OUString
&
rFilter
,
ScDocShellRef
ScExportTest
::
saveAndReloadPassword
(
ScDocShell
*
pShell
,
const
OUString
&
rFilter
,
const
OUString
&
rUserData
,
const
OUString
&
rTypeName
,
sal_uLong
nFormatType
)
const
OUString
&
rUserData
,
const
OUString
&
rTypeName
,
sal_uLong
nFormatType
)
{
{
...
@@ -168,6 +173,7 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt
...
@@ -168,6 +173,7 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt
OUString
aPass
(
"test"
);
OUString
aPass
(
"test"
);
return
load
(
aTempFile
.
GetURL
(),
rFilter
,
rUserData
,
rTypeName
,
nFormatType
,
nFormat
,
SOFFICE_FILEFORMAT_CURRENT
,
&
aPass
);
return
load
(
aTempFile
.
GetURL
(),
rFilter
,
rUserData
,
rTypeName
,
nFormatType
,
nFormat
,
SOFFICE_FILEFORMAT_CURRENT
,
&
aPass
);
}
}
#endif
void
ScExportTest
::
test
()
void
ScExportTest
::
test
()
{
{
...
@@ -190,6 +196,7 @@ void ScExportTest::test()
...
@@ -190,6 +196,7 @@ void ScExportTest::test()
ASSERT_DOUBLES_EQUAL
(
aVal
,
1.0
);
ASSERT_DOUBLES_EQUAL
(
aVal
,
1.0
);
}
}
#if !defined MACOSX && !defined DRAGONFLY
void
ScExportTest
::
testPasswordExport
()
void
ScExportTest
::
testPasswordExport
()
{
{
ScDocShell
*
pShell
=
new
ScDocShell
(
ScDocShell
*
pShell
=
new
ScDocShell
(
...
@@ -215,6 +222,7 @@ void ScExportTest::testPasswordExport()
...
@@ -215,6 +222,7 @@ void ScExportTest::testPasswordExport()
xDocSh
->
DoClose
();
xDocSh
->
DoClose
();
}
}
#endif
void
ScExportTest
::
testConditionalFormatExportODS
()
void
ScExportTest
::
testConditionalFormatExportODS
()
{
{
...
...
sc/qa/unit/subsequent_filters-test.cxx
Dosyayı görüntüle @
1f742c52
...
@@ -136,9 +136,11 @@ public:
...
@@ -136,9 +136,11 @@ public:
void
testRowIndex1BasedXLSX
();
void
testRowIndex1BasedXLSX
();
//misc tests unrelated to the import filters
//misc tests unrelated to the import filters
#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(WNT)
void
testPasswordNew
();
void
testPasswordNew
();
void
testPasswordOld
();
void
testPasswordOld
();
void
testPasswordWrongSHA
();
void
testPasswordWrongSHA
();
#endif
//test shape import
//test shape import
void
testControlImport
();
void
testControlImport
();
...
@@ -247,7 +249,10 @@ public:
...
@@ -247,7 +249,10 @@ public:
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
private
:
private
:
#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(WNT)
void
testPassword_Impl
(
const
OUString
&
rFileNameBase
);
void
testPassword_Impl
(
const
OUString
&
rFileNameBase
);
#endif
uno
::
Reference
<
uno
::
XInterface
>
m_xCalcComponent
;
uno
::
Reference
<
uno
::
XInterface
>
m_xCalcComponent
;
};
};
...
@@ -1486,6 +1491,7 @@ void ScFiltersTest::testRowIndex1BasedXLSX()
...
@@ -1486,6 +1491,7 @@ void ScFiltersTest::testRowIndex1BasedXLSX()
xDocSh
->
DoClose
();
xDocSh
->
DoClose
();
}
}
#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(WNT)
void
ScFiltersTest
::
testPassword_Impl
(
const
OUString
&
aFileNameBase
)
void
ScFiltersTest
::
testPassword_Impl
(
const
OUString
&
aFileNameBase
)
{
{
OUString
aFileExtension
(
getFileFormats
()[
0
].
pName
,
strlen
(
getFileFormats
()[
0
].
pName
),
RTL_TEXTENCODING_UTF8
);
OUString
aFileExtension
(
getFileFormats
()[
0
].
pName
,
strlen
(
getFileFormats
()[
0
].
pName
),
RTL_TEXTENCODING_UTF8
);
...
@@ -1541,6 +1547,7 @@ void ScFiltersTest::testPasswordWrongSHA()
...
@@ -1541,6 +1547,7 @@ void ScFiltersTest::testPasswordWrongSHA()
const
OUString
aFileNameBase
(
"passwordWrongSHA."
);
const
OUString
aFileNameBase
(
"passwordWrongSHA."
);
testPassword_Impl
(
aFileNameBase
);
testPassword_Impl
(
aFileNameBase
);
}
}
#endif
void
ScFiltersTest
::
testControlImport
()
void
ScFiltersTest
::
testControlImport
()
{
{
...
...
sw/qa/core/macros-test.cxx
Dosyayı görüntüle @
1f742c52
...
@@ -51,13 +51,17 @@ class SwMacrosTest : public test::BootstrapFixture, public unotest::MacrosTest
...
@@ -51,13 +51,17 @@ class SwMacrosTest : public test::BootstrapFixture, public unotest::MacrosTest
public
:
public
:
SwMacrosTest
();
SwMacrosTest
();
#if !defined MACOSX && !defined WNT
void
createFileURL
(
const
OUString
&
aFileBase
,
const
OUString
&
aFileExtension
,
OUString
&
rFilePath
);
void
createFileURL
(
const
OUString
&
aFileBase
,
const
OUString
&
aFileExtension
,
OUString
&
rFilePath
);
#endif
virtual
void
setUp
()
SAL_OVERRIDE
;
virtual
void
setUp
()
SAL_OVERRIDE
;
virtual
void
tearDown
()
SAL_OVERRIDE
;
virtual
void
tearDown
()
SAL_OVERRIDE
;
//void testStarBasic();
//void testStarBasic();
#if !defined MACOSX && !defined WNT
void
testVba
();
void
testVba
();
#endif
void
testFdo55289
();
void
testFdo55289
();
CPPUNIT_TEST_SUITE
(
SwMacrosTest
);
CPPUNIT_TEST_SUITE
(
SwMacrosTest
);
#if !defined(MACOSX) && !defined(WNT)
#if !defined(MACOSX) && !defined(WNT)
...
@@ -75,6 +79,7 @@ private:
...
@@ -75,6 +79,7 @@ private:
OUString
m_aBaseString
;
OUString
m_aBaseString
;
};
};
#if !defined MACOSX && !defined WNT
void
SwMacrosTest
::
createFileURL
(
const
OUString
&
aFileBase
,
const
OUString
&
aFileExtension
,
OUString
&
rFilePath
)
void
SwMacrosTest
::
createFileURL
(
const
OUString
&
aFileBase
,
const
OUString
&
aFileExtension
,
OUString
&
rFilePath
)
{
{
OUString
aSep
(
"/"
);
OUString
aSep
(
"/"
);
...
@@ -83,6 +88,7 @@ void SwMacrosTest::createFileURL(const OUString& aFileBase, const OUString& aFil
...
@@ -83,6 +88,7 @@ void SwMacrosTest::createFileURL(const OUString& aFileBase, const OUString& aFil
aBuffer
.
append
(
aSep
).
append
(
aFileBase
).
append
(
aFileExtension
);
aBuffer
.
append
(
aSep
).
append
(
aFileBase
).
append
(
aFileExtension
);
rFilePath
=
aBuffer
.
makeStringAndClear
();
rFilePath
=
aBuffer
.
makeStringAndClear
();
}
}
#endif
#if 0
#if 0
...
@@ -113,6 +119,7 @@ void SwMacrosTest::testStarBasic()
...
@@ -113,6 +119,7 @@ void SwMacrosTest::testStarBasic()
#endif
#endif
#if !defined MACOSX && !defined WNT
void
SwMacrosTest
::
testVba
()
void
SwMacrosTest
::
testVba
()
{
{
TestMacroInfo
testInfo
[]
=
{
TestMacroInfo
testInfo
[]
=
{
...
@@ -148,6 +155,7 @@ void SwMacrosTest::testVba()
...
@@ -148,6 +155,7 @@ void SwMacrosTest::testVba()
pFoundShell
->
DoClose
();
pFoundShell
->
DoClose
();
}
}
}
}
#endif
void
SwMacrosTest
::
testFdo55289
()
void
SwMacrosTest
::
testFdo55289
()
{
{
...
...
sw/qa/extras/rtfimport/rtfimport.cxx
Dosyayı görüntüle @
1f742c52
...
@@ -84,6 +84,7 @@ public:
...
@@ -84,6 +84,7 @@ public:
protected
:
protected
:
/// Copy&paste helper.
/// Copy&paste helper.
#if !defined MACOSX && !defined WNT
void
paste
(
const
OUString
&
aFilename
,
uno
::
Reference
<
text
::
XTextRange
>
xTextRange
=
uno
::
Reference
<
text
::
XTextRange
>
())
void
paste
(
const
OUString
&
aFilename
,
uno
::
Reference
<
text
::
XTextRange
>
xTextRange
=
uno
::
Reference
<
text
::
XTextRange
>
())
{
{
uno
::
Reference
<
document
::
XFilter
>
xFilter
(
m_xSFactory
->
createInstance
(
"com.sun.star.comp.Writer.RtfFilter"
),
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
document
::
XFilter
>
xFilter
(
m_xSFactory
->
createInstance
(
"com.sun.star.comp.Writer.RtfFilter"
),
uno
::
UNO_QUERY_THROW
);
...
@@ -103,6 +104,7 @@ protected:
...
@@ -103,6 +104,7 @@ protected:
}
}
xFilter
->
filter
(
aDescriptor
);
xFilter
->
filter
(
aDescriptor
);
}
}
#endif
AllSettings
m_aSavedSettings
;
AllSettings
m_aSavedSettings
;
};
};
...
...
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