Diff between f0613a37865ac578ac75df9153ef1eac91ed424e and 67ba6ce1127a1648c45e47dff136b6ad84d370bc

Changed Files

File Additions Deletions Status
android/tester-main.c +9 -8 modified

Full Patch

diff --git a/android/tester-main.c b/android/tester-main.c
index 152459d..a8a7bd3 100644
--- a/android/tester-main.c
+++ b/android/tester-main.c
@@ -501,6 +501,15 @@ static int verify_property(bt_property_t *exp_props, int exp_num_props,
 	int i, j;
 	int exp_prop_to_find = exp_num_props;
 
+	if (rec_num_props == 0)
+		return 1;
+
+	if (exp_num_props == 0) {
+		tester_debug("Wrong number of expected properties given");
+		tester_test_failed();
+		return 1;
+	}
+
 	/* Get first exp prop to match and search for it */
 	for (i = 0; i < exp_num_props; i++) {
 		for (j = 0; j < rec_num_props; j++) {
@@ -511,14 +520,6 @@ static int verify_property(bt_property_t *exp_props, int exp_num_props,
 		}
 	}
 
-	if ((i == 0) && exp_props) {
-		tester_warn("No property was verified: %s", exp_num_props ?
-				"unknown error!" :
-				"wrong \'.callback_result.num_properties\'?");
-
-		return 1;
-	}
-
 	return exp_prop_to_find;
 }