From 108d33f166664a62c0ae96773cca91cc3ecd9c15 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Fri, 24 Nov 2023 08:18:15 -0500 Subject: [PATCH] Add MDL::pad_slice test --- src/model.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/model.rs b/src/model.rs index ffe750f..6031965 100755 --- a/src/model.rs +++ b/src/model.rs @@ -883,4 +883,12 @@ mod tests { let mut read_cursor = Cursor::new(v.as_slice()); assert_eq!(MDL::read_single4(&mut read_cursor).unwrap(), a); } + + #[test] + fn pad_slice() { + let a = [3.0, 0.0, -1.0]; + let b = [3.0, 0.0, -1.0, 1.0]; + + assert_eq!(MDL::pad_slice(&a, 1.0), b); + } }