diff options
author | Marcus Fritzsch <marcus.fritzsch@xse.de> | 2014-08-05 10:57:01 +0200 |
---|---|---|
committer | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp> | 2014-09-01 15:55:42 +0900 |
commit | cddc793779561ef704521f951faa39890ef062f5 (patch) | |
tree | be397cbbdf9bd236c99caa0c898ebc92c86c1dcd | |
parent | eb005a8c85575c99a3754a24e34e74a7109fb324 (diff) | |
download | wayland-ivi-extension-cddc793779561ef704521f951faa39890ef062f5.tar.gz |
tests: check roundtrip() result in Test ctor
Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
-rw-r--r-- | ivi-layermanagement-api/test/TestBase.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ivi-layermanagement-api/test/TestBase.cpp b/ivi-layermanagement-api/test/TestBase.cpp index da005f5..de521d5 100644 --- a/ivi-layermanagement-api/test/TestBase.cpp +++ b/ivi-layermanagement-api/test/TestBase.cpp @@ -28,8 +28,11 @@ TestBase::TestBase() }; wl_registry_add_listener(wlRegistry, ®istry_listener, &wlCompositor); - wl_display_dispatch(wlDisplay); - wl_display_roundtrip(wlDisplay); + + if (wl_display_roundtrip(wlDisplay) == -1 || wl_display_roundtrip(wlDisplay) == -1) + { + throw std::runtime_error("wl_display error"); + } wlSurfaces.reserve(10); for (int i = 0; i < wlSurfaces.capacity(); ++i) |