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
3dcf6647
Kaydet (Commit)
3dcf6647
authored
Mar 04, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix CppunitTest_sal_osl_profile
Change-Id: Ie66636881a2e4c754bd95f9d1d72e0b4fc2828df
üst
7d3909b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
31 deletions
+12
-31
osl_old_testprofile.cxx
sal/qa/osl/profile/osl_old_testprofile.cxx
+12
-31
No files found.
sal/qa/osl/profile/osl_old_testprofile.cxx
Dosyayı görüntüle @
3dcf6647
...
...
@@ -23,10 +23,8 @@
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/plugin/TestPlugIn.h"
#include <stdio.h>
#include <osl/profile.h>
#include <rtl/bootstrap.hxx>
namespace
osl_Profile
{
...
...
@@ -42,36 +40,19 @@ namespace osl_Profile
void
oldtests
::
test_profile
(
void
)
{
oslProfile
hProfile
;
rtl_uString
*
ustrProfileName
=
0
;
rtl_uString
*
ustrProfileName2
=
0
;
rtl_uString_newFromAscii
(
&
ustrProfileName
,
"//./tmp/soffice.ini"
);
rtl_uString_newFromAscii
(
&
ustrProfileName2
,
"//./tmp/not_existing_path/soffice.ini"
);
rtl
::
OUString
baseUrl
;
CPPUNIT_ASSERT
(
rtl
::
Bootstrap
::
get
(
"UserInstallation"
,
baseUrl
));
// successful write
hProfile
=
osl_openProfile
(
ustrProfileName
,
0
);
if
(
hProfile
!=
0
)
{
if
(
!
osl_writeProfileBool
(
hProfile
,
"testsection"
,
"testbool"
,
1
))
printf
(
"### cannot write into init file!
\n
"
);
osl_closeProfile
(
hProfile
);
}
// unsuccessful write
hProfile
=
osl_openProfile
(
ustrProfileName2
,
0
);
if
(
hProfile
!=
0
)
{
if
(
osl_writeProfileBool
(
hProfile
,
"testsection"
,
"testbool"
,
1
))
printf
(
"### unexpected success writing into test2.ini!
\n
"
);
osl_closeProfile
(
hProfile
);
}
rtl_uString_release
(
ustrProfileName
);
rtl_uString_release
(
ustrProfileName2
);
oslProfile
hProfile
=
osl_openProfile
(
rtl
::
OUString
(
baseUrl
+
"/soffice.ini"
).
pData
,
osl_Profile_WRITELOCK
);
CPPUNIT_ASSERT
(
hProfile
!=
0
);
CPPUNIT_ASSERT_MESSAGE
(
"cannot write into init file"
,
osl_writeProfileBool
(
hProfile
,
"testsection"
,
"testbool"
,
1
));
CPPUNIT_ASSERT
(
osl_closeProfile
(
hProfile
));
// unsuccessful open
CPPUNIT_ASSERT_EQUAL
(
oslProfile
(
0
),
osl_openProfile
(
rtl
::
OUString
(
baseUrl
+
"/not_existing_path/soffice.ini"
).
pData
,
osl_Profile_WRITELOCK
));
}
}
// namespace osl_Profile
...
...
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