MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_insert

Function test_insert

std/src/console/linebuffer.rs:189–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187
188 #[test]
189 fn test_insert() {
190 let mut buffer = LineBuffer::default();
191 buffer.insert(0, 'c'); // c
192 buffer.insert(0, 'é'); // éc
193
194 // Insertion must happen after the 2-byte UTF-8 code point and not at byte 1.
195 buffer.insert(1, 'à'); // éàc
196 buffer.insert(100, 'd'); // Should not panic even if the given position is invalid.
197
198 assert_eq!(buffer.into_inner(), "éàcd");
199 }
200
201 #[test]
202 fn test_remove() {

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected