Add a test that uses the second bytes of the index to G

This commit is contained in:
Daira Hopwood 2021-09-13 14:41:45 +01:00 committed by GitHub
parent eca002dae0
commit f9522ed2bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -32,7 +32,7 @@ macro_rules! G_PERS {
95, 95,
71, 71,
$i, $i,
$j as u8, ($j & 0xFF) as u8,
($j >> 8) as u8, ($j >> 8) as u8,
] ]
}; };
@ -134,6 +134,7 @@ mod tests {
#[test] #[test]
fn g_pers() { fn g_pers() {
assert_eq!(&G_PERS!(7, 13), b"UA_F4Jumble_G\x07\x0d\x00"); assert_eq!(&G_PERS!(7, 13), b"UA_F4Jumble_G\x07\x0d\x00");
assert_eq!(&G_PERS!(7, 65535), b"UA_F4Jumble_G\x07\xff\xff");
} }
proptest! { proptest! {