From ed53f452c37164d3235bf9c24f96cf62f51e94e5 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 31 Oct 2017 17:57:49 +0000 Subject: [PATCH] ping: Add a serialise test. --- src/ping.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ping.rs b/src/ping.rs index d4044f4..fa696d0 100644 --- a/src/ping.rs +++ b/src/ping.rs @@ -25,6 +25,13 @@ mod tests { Ping::try_from(elem).unwrap(); } + #[test] + fn test_serialise() { + let elem1 = Element::from(Ping); + let elem2: Element = "".parse().unwrap(); + assert_eq!(elem1, elem2); + } + #[test] fn test_invalid() { let elem: Element = "".parse().unwrap();