Mesh Unit Test: Fix bug in TC usage print logic 32/239832/2
authorAnupam Roy <anupam.r@samsung.com>
Thu, 30 Jul 2020 05:44:25 +0000 (11:14 +0530)
committerAnupam Roy <anupam.r@samsung.com>
Thu, 30 Jul 2020 06:46:26 +0000 (12:16 +0530)
Whhen user press ID > valid Menu & < Finish Menu
main menu should be printed

Change-Id: Ic888234c6c0aca079cdba1db93f0ea6c4cabb1c0
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
tests/test/bt_mesh_unit_test.c

index 50eb4b2..583f485 100644 (file)
@@ -1883,10 +1883,12 @@ static gboolean key_event_cb(GIOChannel *chan,
                if (test_id == 0)
                        current_tc_table = BT_MESH_UNIT_TEST_TABLE_MAIN;
                else if(test_id >= BT_MESH_UNIT_TEST_TABLE_NETWORK
-                       && test_id < BT_MESH_UNIT_TEST_TABLE_FINISH) {
+                       && test_id <= BT_MESH_UNIT_TEST_TABLE_CONFIGURATION) {
                        current_tc_table = test_id;
-               }
-               else {
+               } else if (test_id > BT_MESH_UNIT_TEST_TABLE_CONFIGURATION
+                       && test_id < BT_MESH_UNIT_TEST_TABLE_FINISH) {
+                       current_tc_table = BT_MESH_UNIT_TEST_TABLE_MAIN;
+               } else {
                        is_call_api = true;
                }
        }