pallas-codec 0.35.0

Pallas common CBOR encoding interface and utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use pallas_codec::flat::zigzag::ZigZag;
use proptest::prelude::*;

proptest! {
    #[test]
    fn zigzag(i: isize) {
        let u = i.zigzag();
        let converted_i = u.zigzag();
        assert_eq!(converted_i, i);
    }

    #[test]
    fn zagzig(u: usize) {
        let i = u.zigzag();
        let converted_u = i.zigzag();
        assert_eq!(converted_u, u);
    }
}