Add a test for `concat`
@@ -277,6 +277,18 @@ fn panicking_clone() {
assert_eq!(lifespan_tracker.drop_count(), 11);
}
+#[test]
+fn concat() {
+ assert_eq!(
+ staticvec!["A, B"].concat(&staticvec!["C", "D", "E", "F"]),
+ ["A, B", "C", "D", "E", "F"]
+ );
+ let v = StaticVec::<i32, 0>::from([]).concat(&StaticVec::<i32, 0>::from([]));
+ assert_eq!(v, []);
+ let v2 = staticvec![4, 5, 6].concat(&staticvec![1, 2, 3]);
+ assert_eq!(v2, [4, 5, 6, 1, 2, 3]);
+}
+
#[test]
fn dedup() {
let mut vec = staticvec![1, 2, 2, 3, 2];
