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
ca3b8b0c
Commit
ca3b8b0c
authored
Sep 22, 2014
by
Martin Flöser
Browse files
Add test case for operator cast in Compositor
parent
ebac7d3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/wayland/autotests/client/test_compositor.cpp
View file @
ca3b8b0c
...
...
@@ -40,6 +40,7 @@ private Q_SLOTS:
void
cleanup
();
void
testDestroy
();
void
testCast
();
private:
KWayland
::
Server
::
Display
*
m_display
;
...
...
@@ -136,5 +137,25 @@ void TestCompositor::testDestroy()
m_compositor
->
destroy
();
}
void
TestCompositor
::
testCast
()
{
using
namespace
KWayland
::
Client
;
Registry
registry
;
QSignalSpy
compositorSpy
(
&
registry
,
SIGNAL
(
compositorAnnounced
(
quint32
,
quint32
)));
registry
.
create
(
m_connection
->
display
());
QVERIFY
(
registry
.
isValid
());
registry
.
setup
();
QVERIFY
(
compositorSpy
.
wait
());
Compositor
c
;
auto
wlComp
=
registry
.
bindCompositor
(
compositorSpy
.
first
().
first
().
value
<
quint32
>
(),
compositorSpy
.
first
().
last
().
value
<
quint32
>
());
c
.
setup
(
wlComp
);
QCOMPARE
((
wl_compositor
*
)
c
,
wlComp
);
const
Compositor
&
c2
(
c
);
QCOMPARE
((
wl_compositor
*
)
c2
,
wlComp
);
}
QTEST_MAIN
(
TestCompositor
)
#include
"test_compositor.moc"
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