From f272b76cf6fa4d61fc03dec0bad7a687492d7d54 Mon Sep 17 00:00:00 2001 From: nujz Date: Sun, 20 Sep 2020 09:05:47 +0800 Subject: [PATCH] modify unit test --- router/src/url.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/router/src/url.rs b/router/src/url.rs index 6215982a..b5d6d8a6 100644 --- a/router/src/url.rs +++ b/router/src/url.rs @@ -239,5 +239,13 @@ mod tests { assert!(from_hex(c).is_none()) } } + + let expected = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 10, 11, 12, 13, 14, 15, + ]; + for i in 0..hex.len() { + println!("{}", hex[i]); + assert_eq!(from_hex(hex[i]).unwrap(), expected[i]); + } } }