diny_test 0.2.4

Test serializer format for the diny framework
Documentation
#![cfg_attr(not(feature = "std"), no_std)]

#![allow(incomplete_features)]
#![feature(generic_associated_types)]

mod common;

#[cfg(feature = "std")]
mod test {
    use super::common::SEQ_LEN;
    use super::common::method::eq::*;
    use std::collections::LinkedList;
    
    #[test]
    fn can_serialize_empty_linked_list() {
        test_serialize_exact::<LinkedList<u64>, {SEQ_LEN}>(LinkedList::new());
    }
    
    #[test]
    fn can_serialize_linked_list_single() {
        let mut vd = LinkedList::new();
        vd.push_back(5);
        test_serialize_exact::<LinkedList<u64>, {SEQ_LEN + 8}>(vd);
    }
    
    #[test]
    fn can_serialize_linked_list_multiple() {
        let mut vd = LinkedList::new();
        vd.push_back(1);
        vd.push_back(2);
        vd.push_back(3);
        test_serialize_exact::<LinkedList<u64>, {SEQ_LEN+8*3}>(vd);
    }
}