mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-10 15:40:11 +00:00
fix test names
This commit is contained in:
parent
a0cf2f3fb8
commit
ceae589383
@ -129,16 +129,22 @@ void CHECK_EQUAL_ARRAY(uint8_t * expected, uint8_t * actual, int size){
|
||||
#define CHECK_ACL_PACKET(packet) { printf("check " #packet "\n") ; CHECK_EQUAL_ARRAY(packet, mock_packet_buffer(), sizeof(packet)); mock_clear_packet_buffer(); }
|
||||
|
||||
|
||||
TEST_GROUP(GATTClient){
|
||||
TEST_GROUP(SecurityManager){
|
||||
void setup(void){
|
||||
btstack_memory_init();
|
||||
run_loop_init(RUN_LOOP_POSIX);
|
||||
sm_init();
|
||||
sm_set_io_capabilities(IO_CAPABILITY_NO_INPUT_NO_OUTPUT);
|
||||
sm_set_authentication_requirements( SM_AUTHREQ_BONDING );
|
||||
}
|
||||
};
|
||||
|
||||
TEST(SecurityManager, MainTest){
|
||||
|
||||
mock_simulate_hci_state_working();
|
||||
|
||||
printf("0\n");
|
||||
|
||||
// expect le encrypt commmand
|
||||
CHECK_HCI_COMMAND(test_command_packet_01);
|
||||
|
||||
@ -149,17 +155,25 @@ TEST_GROUP(GATTClient){
|
||||
|
||||
aes128_report_result();
|
||||
|
||||
printf("1\n");
|
||||
|
||||
mock_simulate_connected();
|
||||
|
||||
uint8_t test_pairing_request_command[] = { 0x01, 0x04, 0x00, 0x01, 0x10, 0x07, 0x07 };
|
||||
mock_simulate_sm_data_packet(&test_pairing_request_command[0], sizeof(test_pairing_request_command));
|
||||
|
||||
printf("2\n");
|
||||
|
||||
// expect send pairing response command
|
||||
CHECK_ACL_PACKET(test_acl_packet_03);
|
||||
|
||||
printf("3\n");
|
||||
|
||||
uint8_t test_pairing_confirm_command[] = { 0x03, 0x84, 0x5a, 0x87, 0x9a, 0x0f, 0xa9, 0x42, 0xba, 0x48, 0xc5, 0x79, 0xa0, 0x70, 0x70, 0xa9, 0xc8 };
|
||||
mock_simulate_sm_data_packet(&test_pairing_confirm_command[0], sizeof(test_pairing_confirm_command));
|
||||
|
||||
printf("4\n");
|
||||
|
||||
// expect le random command
|
||||
CHECK_HCI_COMMAND(test_command_packet_04);
|
||||
|
||||
@ -269,10 +283,6 @@ TEST_GROUP(GATTClient){
|
||||
|
||||
// expect send LE SMP Code Signing Information Command
|
||||
CHECK_ACL_PACKET(test_acl_packet_22);
|
||||
}
|
||||
};
|
||||
|
||||
TEST(GATTClient, TestScanning){
|
||||
}
|
||||
|
||||
int main (int argc, const char * argv[]){
|
||||
|
Loading…
x
Reference in New Issue
Block a user