b3_utils 0.13.1

Utility functions for building on the Internet Computer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#[cfg(test)]
mod tests {
    use crate::nonce::Nonce;

    #[test]
    fn test_nonce() {
        let mut nonce = Nonce::new(Some(5));
        assert_eq!(nonce.current(), Nonce(5));
        assert_eq!(nonce.next(), Nonce(6));
        assert_eq!(nonce.current(), Nonce(6));
    }
}