Skip to content

Commit cca663f

Browse files
committed
Add test
1 parent 6dccb48 commit cca663f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/tests.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,3 +686,10 @@ fn test_extend_zst() {
686686
assert_eq!(&array[..], &[Z; 5]);
687687
assert_eq!(array.len(), 5);
688688
}
689+
690+
#[test]
691+
fn test_try_from_argument() {
692+
use core::convert::TryFrom;
693+
let v = ArrayString::<[u8; 16]>::try_from(format_args!("Hello {}", 123)).unwrap();
694+
assert_eq!(&v, "Hello 123");
695+
}

0 commit comments

Comments
 (0)