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
1aa73339
Kaydet (Commit)
1aa73339
authored
Tem 07, 2015
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add vcl lifecycle test for Toolkit / XWindow peers.
Change-Id: I0114595dcecaddde343a16f096de16f53f9b7a5a
üst
ec47717b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
CppunitTest_vcl_lifecycle.mk
vcl/CppunitTest_vcl_lifecycle.mk
+1
-0
lifecycle.cxx
vcl/qa/cppunit/lifecycle.cxx
+26
-0
No files found.
vcl/CppunitTest_vcl_lifecycle.mk
Dosyayı görüntüle @
1aa73339
...
@@ -27,6 +27,7 @@ $(eval $(call gb_CppunitTest_use_libraries,vcl_lifecycle, \
...
@@ -27,6 +27,7 @@ $(eval $(call gb_CppunitTest_use_libraries,vcl_lifecycle, \
sal \
sal \
svt \
svt \
test \
test \
tk \
tl \
tl \
unotest \
unotest \
vcl \
vcl \
...
...
vcl/qa/cppunit/lifecycle.cxx
Dosyayı görüntüle @
1aa73339
...
@@ -20,6 +20,8 @@
...
@@ -20,6 +20,8 @@
#include <vcl/dialog.hxx>
#include <vcl/dialog.hxx>
#include <vcl/layout.hxx>
#include <vcl/layout.hxx>
#include <vcl/svapp.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/awt/XWindow.hpp>
#include <com/sun/star/lang/XComponent.hpp>
class
LifecycleTest
:
public
test
::
BootstrapFixture
class
LifecycleTest
:
public
test
::
BootstrapFixture
{
{
...
@@ -37,6 +39,7 @@ public:
...
@@ -37,6 +39,7 @@ public:
void
testPostDispose
();
void
testPostDispose
();
void
testFocus
();
void
testFocus
();
void
testLeakage
();
void
testLeakage
();
void
testToolkit
();
CPPUNIT_TEST_SUITE
(
LifecycleTest
);
CPPUNIT_TEST_SUITE
(
LifecycleTest
);
CPPUNIT_TEST
(
testCast
);
CPPUNIT_TEST
(
testCast
);
...
@@ -48,6 +51,7 @@ public:
...
@@ -48,6 +51,7 @@ public:
CPPUNIT_TEST
(
testPostDispose
);
CPPUNIT_TEST
(
testPostDispose
);
CPPUNIT_TEST
(
testFocus
);
CPPUNIT_TEST
(
testFocus
);
CPPUNIT_TEST
(
testLeakage
);
CPPUNIT_TEST
(
testLeakage
);
CPPUNIT_TEST
(
testToolkit
);
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
};
};
...
@@ -289,6 +293,28 @@ void LifecycleTest::testLeakage()
...
@@ -289,6 +293,28 @@ void LifecycleTest::testLeakage()
delete
*
i
;
delete
*
i
;
}
}
void
LifecycleTest
::
testToolkit
()
{
LeakTestObject
*
pVclWin
=
LeakTestObject
::
Create
<
WorkWindow
>
(
nullptr
,
WB_APP
|
WB_STDWORK
);
css
::
uno
::
Reference
<
css
::
awt
::
XWindow
>
xWindow
(
pVclWin
->
getRef
()
->
GetComponentInterface
(),
css
::
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT
(
xWindow
.
is
());
// test UNO dispose
css
::
uno
::
Reference
<
css
::
lang
::
XComponent
>
xWinComponent
(
xWindow
,
css
::
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT
(
xWinComponent
.
is
());
CPPUNIT_ASSERT
(
!
pVclWin
->
getRef
()
->
IsDisposed
());
xWinComponent
->
dispose
();
CPPUNIT_ASSERT
(
pVclWin
->
getRef
()
->
IsDisposed
());
// test UNO cleanup
xWinComponent
.
clear
();
xWindow
.
clear
();
pVclWin
->
disposeAndClear
();
pVclWin
->
assertDeleted
();
delete
pVclWin
;
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
LifecycleTest
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
LifecycleTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
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