From ae694f44ef00a4a5933af16bdd7542de8695436d Mon Sep 17 00:00:00 2001 From: Christian Ebner Date: Tue, 23 Apr 2019 17:04:31 +0200 Subject: [PATCH] src/tools/procfs.rs: add tests for read_proc_net_route() and read_proc_net_ipv6_route() Signed-off-by: Christian Ebner --- src/tools/procfs.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/tools/procfs.rs b/src/tools/procfs.rs index db85bd3d..e81bf82d 100644 --- a/src/tools/procfs.rs +++ b/src/tools/procfs.rs @@ -405,3 +405,18 @@ pub fn read_proc_net_ipv6_route() -> Result, Error> { Ok(result) } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_read_proc_net_route() { + read_proc_net_route().unwrap(); + } + + #[test] + fn test_read_proc_net_ipv6_route() { + read_proc_net_ipv6_route().unwrap(); + } +}