Skip to content

Commit

Permalink
Additional test (mutants)
Browse files Browse the repository at this point in the history
  • Loading branch information
optout21 committed Aug 31, 2024
1 parent 2531ef1 commit 55e4259
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lightning-invoice/src/test_ser_de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ fn array_u8() {
ser_de_test_len([255, 254, 253, 252, 251, 250, 249, 248, 247, 246], "lll0ml8mltul3alk");
}

#[test]
fn array_u8_error_invalid_length() {
assert_eq!(
<[u8; 3]>::from_base32(
&"qqqs".to_string().chars().map(|c| Fe32::from_char(c).unwrap()).collect::<Vec<_>>()[..]
)
.err()
.unwrap()
.to_string(),
"Slice had length 4 instead of 5 in function <[u8; N]>::from_base32()"
);
}

#[test]
fn payment_secret() {
let payment_secret = PaymentSecret([7; 32]);
Expand Down

0 comments on commit 55e4259

Please sign in to comment.