MCPcopy Create free account
hub / github.com/Lokathor/tinyvec / test_debugger_visualizer

Function test_debugger_visualizer

tests/debugger_visualizer.rs:62–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60)]
61#[inline(never)]
62fn test_debugger_visualizer() {
63 let mut strings = ArrayVec::<[&str; 7]>::default();
64 strings.push("a");
65 strings.push("b");
66 strings.push("c");
67 assert_eq!(["a", "b", "c"], &strings[..]);
68
69 let mut inline_tv = tiny_vec!([i32; 4] => 1, 2, 3);
70 assert!(inline_tv.is_inline());
71
72 inline_tv.push(4);
73 __break();
74
75 {
76 let mut slice_vec = SliceVec::from(strings.as_mut_slice());
77 assert_eq!(3, slice_vec.capacity());
78 assert_eq!("c", slice_vec.remove(2));
79 slice_vec.push("d");
80 println!("{:?}", slice_vec);
81 __break();
82
83 assert_eq!(["a", "b", "d"], &slice_vec[..]);
84 }
85
86 strings.push("e");
87 strings.push("f");
88 strings.push("g");
89 assert_eq!(["a", "b", "d", "e", "f", "g"], &strings[..]);
90 __break();
91}

Callers

nothing calls this directly

Calls 3

__breakFunction · 0.85
pushMethod · 0.45
as_mut_sliceMethod · 0.45

Tested by

no test coverage detected