summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-05-27 18:19:37 +0900
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-06-17 09:56:38 +0900
commit349c902f01f3b2beae74226444ffa14d987e5750 (patch)
tree09d10b375ba6bdae5142f58fe532e358de71c18c
parentc97448038bd74cc9c86986440d516c7379e1a60e (diff)
downloadwayland-ivi-extension-349c902f01f3b2beae74226444ffa14d987e5750.tar.gz
test: Throw exception if wl_display_roundtrip returns error.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
-rw-r--r--ivi-layermanagement-api/test/ilm_control_notification_test.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/ivi-layermanagement-api/test/ilm_control_notification_test.cpp b/ivi-layermanagement-api/test/ilm_control_notification_test.cpp
index 8edd9e6..12abd5c 100644
--- a/ivi-layermanagement-api/test/ilm_control_notification_test.cpp
+++ b/ivi-layermanagement-api/test/ilm_control_notification_test.cpp
@@ -58,6 +58,16 @@ class NotificationTest: public TestBase, public ::testing::Test {
}
};
+ void IlmCommitChanges()
+ {
+ int error = wl_display_roundtrip(wlDisplay);
+ if (error) {
+ throw std::exception();
+ }
+
+ ilm_commitChanges();
+ }
+
public:
static void SetUpTestCase() {
@@ -78,15 +88,15 @@ public:
// create a layer
layer = 345;
ilm_layerRemove(layer);
- ilm_commitChanges();
+ IlmCommitChanges();
ilm_layerCreateWithDimension(&layer, 800, 480);
- ilm_commitChanges();
+ IlmCommitChanges();
// create a surface
surface = 456;
ilm_surfaceRemove(surface);
- ilm_commitChanges();
+ IlmCommitChanges();
ilm_surfaceCreate((t_ilm_nativehandle)wlSurface,10,10,ILM_PIXELFORMAT_RGBA_8888,&surface);
- ilm_commitChanges();
+ IlmCommitChanges();
timesCalled=0;
}