File: bool.rs

package info (click to toggle)
rust-rmp 0.8.14-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 396 kB
  • sloc: makefile: 2
file content (19 lines) | stat: -rw-r--r-- 302 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use rmp::encode::*;

#[test]
fn pass_pack_true() {
    let mut buf = [0x00];

    write_bool(&mut &mut buf[..], true).unwrap();

    assert_eq!([0xc3], buf);
}

#[test]
fn pass_pack_false() {
    let mut buf = [0x00];

    write_bool(&mut &mut buf[..], false).unwrap();

    assert_eq!([0xc2], buf);
}