From 2fb6e4fa9275664b92d7e7785dd0a816d7387d97 Mon Sep 17 00:00:00 2001 From: David Mehren <dmehren1@gmail.com> Date: Thu, 12 Jul 2018 19:03:55 +0200 Subject: [PATCH] [LOUDSTree] Test NoSuchChild in labeled_child --- src/trees/louds_tree.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/trees/louds_tree.rs b/src/trees/louds_tree.rs index 0d29366..ba7478c 100644 --- a/src/trees/louds_tree.rs +++ b/src/trees/louds_tree.rs @@ -516,6 +516,12 @@ mod tests { louds_tree.labeled_child(4, String::from("leaf")).unwrap(), 7 ); + assert_eq!( + louds_tree + .labeled_child(4, String::from("foobar")) + .unwrap_err(), + NodeError::NoSuchChildError + ); } #[test] -- GitLab