None, ); } #[test] fn metadata_function_returns_none_if_metadata_fails_to_parse() { assert_eq!( Inscription { metadata: Some(vec![0x44]), ..Default::default() } .metadata(), None, ); } #[test] fn pointer_decode() { assert_eq!( Inscription { pointer: None, ..Default::default() } .pointer(), None ); assert_eq!( Inscription { pointer: Some(vec![0]), ..Default::default() } .pointer(), Some(0), ); assert_eq!( Inscription { pointer: Some(vec![1, 2, 3, 4, 5, 6, 7, 8]), ..Default::default() } .pointer(), Some(0x0807060504030201), ); assert_eq!( Inscription { pointer: Some(vec![1, 2, 3, 4, 5, 6]), ..Default::default() } .pointer(), Some(0x0000060504030201), ); assert_eq!( Inscription { pointer: Some(vec![1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0]),