Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
67c45c1a
Commit
67c45c1a
authored
Nov 10, 2015
by
Martin Flöser
Browse files
[autotests] Destroy a created ClientConnection
parent
868282fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/wayland/autotests/client/test_wayland_connection_thread.cpp
View file @
67c45c1a
...
...
@@ -209,7 +209,10 @@ void TestWaylandConnectionThread::testConnectFd()
using
namespace
KWayland
::
Server
;
int
sv
[
2
];
QVERIFY
(
socketpair
(
AF_UNIX
,
SOCK_STREAM
,
0
,
sv
)
>=
0
);
QVERIFY
(
m_display
->
createClient
(
sv
[
0
]));
auto
c
=
m_display
->
createClient
(
sv
[
0
])
QVERIFY
(
c
);
QSignalSpy
disconnectedSpy
(
c
,
&
ClientConnection
::
disconnected
);
QVERIFY
(
disconnectedSpy
.
isValid
());
ConnectionThread
*
connection
=
new
ConnectionThread
;
QSignalSpy
connectedSpy
(
connection
,
SIGNAL
(
connected
()));
...
...
@@ -237,6 +240,9 @@ void TestWaylandConnectionThread::testConnectFd()
connectionThread
->
quit
();
connectionThread
->
wait
();
delete
connectionThread
;
c
->
destroy
();
QCOMPARE
(
disconnectedSpy
.
count
(),
1
);
}
void
TestWaylandConnectionThread
::
testConnectFdNoSocketName
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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