summaryrefslogtreecommitdiff
path: root/ivi-layermanagement-api
diff options
context:
space:
mode:
authorShivakumar Halagatti <Shivakumar.Halagatti@in.bosch.com>2020-12-21 12:36:55 +0530
committerShivakumar Halagatti <Shivakumar.Halagatti@in.bosch.com>2020-12-21 12:46:48 +0530
commitcf4c435b160084cf99046e79c791c5e18680aa38 (patch)
treed19ae481defdbdd0355ac26ab46c3e7d4e64f4c4 /ivi-layermanagement-api
parente9db3301fdf9625dda719157b981dc9d5e8f26f6 (diff)
downloadwayland-ivi-extension-cf4c435b160084cf99046e79c791c5e18680aa38.tar.gz
test : Fix compiler warnings
Solve indentation warnings for if-else case and for loop. Signed-off-by: Shivakumar Halagatti <Shivakumar.Halagatti@in.bosch.com>
Diffstat (limited to 'ivi-layermanagement-api')
-rw-r--r--ivi-layermanagement-api/test/ilm_input_test.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/ivi-layermanagement-api/test/ilm_input_test.cpp b/ivi-layermanagement-api/test/ilm_input_test.cpp
index abc392d..032a7e3 100644
--- a/ivi-layermanagement-api/test/ilm_input_test.cpp
+++ b/ivi-layermanagement-api/test/ilm_input_test.cpp
@@ -125,8 +125,9 @@ TEST_F(IlmInputTest, ilm_input_focus) {
for (unsigned int i = 0; i < num_ids; i++) {
/* All surfaces now have keyboard focus */
for (unsigned int j = 0; j < surfaceCount; j++) {
- if (surfaceIDs[i] == surfaces[j])
+ if (surfaceIDs[i] == surfaces[j]) {
EXPECT_EQ(bitmasks[i], ILM_INPUT_DEVICE_KEYBOARD);
+ }
}
}
free(surfaceIDs);
@@ -136,9 +137,11 @@ TEST_F(IlmInputTest, ilm_input_focus) {
ASSERT_EQ(ILM_SUCCESS, ilm_setInputFocus(&surfaces[0], 1, ILM_INPUT_DEVICE_KEYBOARD, ILM_FALSE));
ASSERT_EQ(ILM_SUCCESS, ilm_getInputFocus(&surfaceIDs, &bitmasks, &num_ids));
/* keyboard focus now removed for surfaces[0] */
- for (unsigned int i = 0; i < num_ids; i++)
- if (surfaceIDs[i] == surfaces[0])
+ for (unsigned int i = 0; i < num_ids; i++) {
+ if (surfaceIDs[i] == surfaces[0]) {
EXPECT_EQ(bitmasks[i], 0);
+ }
+ }
free(surfaceIDs);
free(bitmasks);
@@ -146,9 +149,11 @@ TEST_F(IlmInputTest, ilm_input_focus) {
ASSERT_EQ(ILM_SUCCESS, ilm_setInputFocus(&surfaces[1], 1, ILM_INPUT_DEVICE_POINTER, ILM_TRUE));
ASSERT_EQ(ILM_SUCCESS, ilm_getInputFocus(&surfaceIDs, &bitmasks, &num_ids));
/* surfaces[1] now has pointer and keyboard focus */
- for (unsigned int i = 0; i < num_ids; i++)
- if (surfaceIDs[i] == surfaces[1])
+ for (unsigned int i = 0; i < num_ids; i++) {
+ if (surfaceIDs[i] == surfaces[1]) {
EXPECT_EQ(bitmasks[i], ILM_INPUT_DEVICE_POINTER | ILM_INPUT_DEVICE_KEYBOARD);
+ }
+ }
free(surfaceIDs);
free(bitmasks);
@@ -156,9 +161,11 @@ TEST_F(IlmInputTest, ilm_input_focus) {
ASSERT_EQ(ILM_SUCCESS, ilm_setInputFocus(&surfaces[2], 1, ILM_INPUT_DEVICE_TOUCH, ILM_TRUE));
ASSERT_EQ(ILM_SUCCESS, ilm_getInputFocus(&surfaceIDs, &bitmasks, &num_ids));
/* surfaces[2] now has keyboard and touch focus */
- for (unsigned int i = 0; i < num_ids; i++)
- if (surfaceIDs[i] == surfaces[2])
+ for (unsigned int i = 0; i < num_ids; i++) {
+ if (surfaceIDs[i] == surfaces[2]) {
EXPECT_EQ(bitmasks[i], ILM_INPUT_DEVICE_KEYBOARD | ILM_INPUT_DEVICE_TOUCH);
+ }
+ }
free(surfaceIDs);
free(bitmasks);
}