1
0
Fork 0
firefox/third_party/rust/rmp/tests/func/decode/bool.rs
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

21 lines
392 B
Rust

use super::Cursor;
use rmp::decode::*;
#[test]
fn from_bool_false() {
let buf = [0xc2];
let mut cur = Cursor::new(&buf[..]);
assert!(!read_bool(&mut cur).unwrap());
assert_eq!(1, cur.position());
}
#[test]
fn from_bool_true() {
let buf = [0xc3];
let mut cur = Cursor::new(&buf[..]);
assert!(read_bool(&mut cur).unwrap());
assert_eq!(1, cur.position());
}