-
Notifications
You must be signed in to change notification settings - Fork 18
tests: unittest: adding unit tests for ble_gq lib #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Added unit tests for ble_gq library Signed-off-by: Nirmal Krishna <[email protected]> Co-authored-by: Andreas Moltumyr <[email protected]>
You can find the documentation preview for this PR here. |
uint16_t conn_handle = 0x0C4; | ||
|
||
ble_evt.header.evt_id = BLE_GAP_EVT_DISCONNECTED; | ||
ble_evt.evt.gap_evt.conn_handle = 0x0C4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I would consider defining 0x0C4
somewhere and then reusing the definition in all the different occurrences, rather than hardcoding the value.
No milestone required for tests |
for (int i = 0; i < ble_gq.max_conns; i++) { | ||
ble_gq.conn_handles[i] = i + 1; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not alter the ble_gq ourselves. Perhaps register up to max_conns
handlers successfully, then see that the next fails?
sys_slist_init(&ble_gq.req_queue[0]); | ||
sys_slist_append(&ble_gq.req_queue[0], &req.node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be another way to append these than by altering the struct with slist. Use ble_gq_item_add()
?
Added unit tests for ble_gq library