summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Juszkiewicz <lukasz.juszkiewicz@bmw-carit.de>2014-04-30 18:15:34 +0200
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>2014-05-13 13:33:49 +0200
commit708d0c769bbc98068a5a9f38b674e5b6b83d4131 (patch)
tree39f361a3a66f73675556a1cf58da00b5c1b5eb09
parentbd520d39b54118b4e17477027d3c6b0957d68bc3 (diff)
downloadwayland-ivi-extension-708d0c769bbc98068a5a9f38b674e5b6b83d4131.tar.gz
tests: expected behaviour of "*_Invalid*" tests
Signed-off-by: Lukasz Juszkiewicz <lukasz.juszkiewicz@bmw-carit.de>
-rw-r--r--ivi-layermanagement-api/test/ilm_control_test.cpp28
1 files changed, 5 insertions, 23 deletions
diff --git a/ivi-layermanagement-api/test/ilm_control_test.cpp b/ivi-layermanagement-api/test/ilm_control_test.cpp
index f5f1d77..09c9eef 100644
--- a/ivi-layermanagement-api/test/ilm_control_test.cpp
+++ b/ivi-layermanagement-api/test/ilm_control_test.cpp
@@ -83,7 +83,7 @@ TEST_F(IlmCommandTest, SetGetSurfaceDimension_InvalidInput) {
t_ilm_uint dim[2] = {15, 25};
ASSERT_NE(ILM_SUCCESS, ilm_surfaceSetDimension(surface, dim));
- EXPECT_NE(ILM_SUCCESS, ilm_surfaceGetDimension(surface, dim));
+ ASSERT_NE(ILM_SUCCESS, ilm_surfaceGetDimension(surface, dim));
}
TEST_F(IlmCommandTest, SetGetLayerDimension) {
@@ -110,9 +110,6 @@ TEST_F(IlmCommandTest, SetGetLayerDimension_InvalidInput) {
ASSERT_NE(ILM_SUCCESS, ilm_layerSetDimension(layer, dim));
ASSERT_NE(ILM_SUCCESS, ilm_layerGetDimension(layer, dim));
-
- // cleanup
- ASSERT_EQ(ILM_SUCCESS, ilm_layerRemove(layer));
}
TEST_F(IlmCommandTest, SetGetSurfacePosition) {
@@ -374,8 +371,7 @@ TEST_F(IlmCommandTest, SetSurfaceSourceRectangle) {
}
TEST_F(IlmCommandTest, SetSurfaceSourceRectangle_InvalidInput) {
- ASSERT_EQ(ILM_SUCCESS, ilm_surfaceSetSourceRectangle(0xdeadbeef, 89, 6538, 638, 4));
- ASSERT_NE(ILM_SUCCESS, ilm_commitChanges());
+ ASSERT_NE(ILM_SUCCESS, ilm_surfaceSetSourceRectangle(0xdeadbeef, 89, 6538, 638, 4));
}
TEST_F(IlmCommandTest, ilm_getScreenIDs) {
@@ -541,21 +537,11 @@ TEST_F(IlmCommandTest, ilm_layerCreate_Remove) {
}
TEST_F(IlmCommandTest, ilm_layerRemove_InvalidInput) {
- t_ilm_int length;
- t_ilm_uint* IDs;
- ASSERT_EQ(ILM_SUCCESS, ilm_getLayerIDs(&length, &IDs));
- free(IDs);
-
- t_ilm_int new_length;
- ASSERT_EQ(ILM_SUCCESS, ilm_layerRemove(0xdeadbeef));
- ASSERT_EQ(ILM_SUCCESS, ilm_commitChanges());
- ASSERT_EQ(ILM_SUCCESS, ilm_getLayerIDs(&new_length, &IDs));
- ASSERT_EQ(length, new_length);
- free(IDs);
+ ASSERT_NE(ILM_SUCCESS, ilm_layerRemove(0xdeadbeef));
}
TEST_F(IlmCommandTest, ilm_layerRemove_InvalidUse) {
- uint layer = 0xdeadbeef;
+ uint layer = 0xbeef;
t_ilm_uint* IDs;
t_ilm_int orig_length;
t_ilm_int length;
@@ -580,11 +566,7 @@ TEST_F(IlmCommandTest, ilm_layerRemove_InvalidUse) {
free(IDs);
// try to remove the same layer once more
- ASSERT_EQ(ILM_SUCCESS, ilm_layerRemove(layer));
- ASSERT_EQ(ILM_SUCCESS, ilm_commitChanges());
- ASSERT_EQ(ILM_SUCCESS, ilm_getLayerIDs(&new_length, &IDs));
- ASSERT_EQ(length, new_length);
- free(IDs);
+ ASSERT_NE(ILM_SUCCESS, ilm_layerRemove(layer));
}
TEST_F(IlmCommandTest, ilm_layerGetType) {