Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ReCore-sys committed Dec 31, 2024
1 parent 7acc227 commit aaf5d34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/utils/general_purpose/src/data_packing/i32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ mod tests {
fn test_read_nbit_i32() {
let data: i64 = 0b110101011;
assert_eq!(read_nbit_i32(&data, 3, 0).unwrap(), 0b011);
assert_eq!(read_nbit_i32(&data, 3, 3).unwrap(), -3); // 0b101 as i32 is -3
assert_eq!(read_nbit_i32(&data, 3, 6).unwrap(), -2); // 0b110 as i32 is -2
assert_eq!(read_nbit_i32(&data, 3, 3).unwrap(), 0b101);
assert_eq!(read_nbit_i32(&data, 3, 6).unwrap(), 0b110);
assert_eq!(read_nbit_i32(&data, 3, 9).unwrap(), 0b000);
}

Expand Down

0 comments on commit aaf5d34

Please sign in to comment.