Add get_labels() test

This commit is contained in:
Matéo Duparc 2021-05-18 13:51:19 +02:00
parent 9d2713aea1
commit 08c3c48a67
Signed by: hardcoresushi
GPG Key ID: 007F84120107191E

View File

@ -174,4 +174,15 @@ mod tests {
nonces.push(nonce);
}
}
#[test]
fn get_labels() {
let (hl, hp) = super::get_labels(true, true);
assert_eq!(hl, "handshake_i_am_bob");
assert_eq!(hp, "handshake_i_am_alice");
let (al, ap) = super::get_labels(false, false);
assert_eq!(al, "application_i_am_alice");
assert_eq!(ap, "application_i_am_bob");
}
}