Skip to content

Commit

Permalink
Update tests.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
navichok26 committed Feb 14, 2024
1 parent 1c4387a commit 2276948
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tests.rs
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ async fn test_send(aes_params: Vec<u8>, nonce: Vec<u8>, buffer: Vec<u8>, expecte
let aes_params = AdnlAesParams::from(aes_params);
let mut protocol_client = AdnlSender::new(&aes_params);
let mut packet = Vec::<u8>::new();
let _result = protocol_client.send_with_nonce(&mut packet, &mut nonce, &mut buffer).await;
let _result = protocol_client.send(&mut packet, &mut nonce, &mut buffer).await;
assert_eq!(
packet.as_slice(),
&expected_packet,
@@ -128,6 +128,6 @@ async fn test_recv_2() {
async fn test_recv(client: &mut AdnlReceiver, encrypted_packet: Vec<u8>, expected_data: Vec<u8>) {
let mut data = Vec::<u8>::new();
let mut binding = encrypted_packet.as_slice();
let _r = client.receive_with_buffer::<_, _, 8192>(&mut binding, &mut data).await;
let _r = client.receive::<_, _, 8192>(&mut binding, &mut data).await;
assert_eq!(data, expected_data.as_slice(), "incoming packet is wrong");
}

0 comments on commit 2276948

Please sign in to comment.