pub struct TestBuffer {
pub buffer: Buffer,
}Expand description
A buffer wrapper for testing component render output.
Fields§
§buffer: BufferImplementations§
Source§impl TestBuffer
impl TestBuffer
Sourcepub fn assert_text(&self, x: u16, y: u16, expected: &str)
pub fn assert_text(&self, x: u16, y: u16, expected: &str)
Asserts that the cell at (x, y) contains the expected text.
Sourcepub fn assert_line(&self, y: u16, expected: &str)
pub fn assert_line(&self, y: u16, expected: &str)
Asserts that a line starting from x=0 matches the expected text. Spaces at the end of rendered output are trimmed before comparison.
Sourcepub fn assert_lines(&self, expected: &[&str])
pub fn assert_lines(&self, expected: &[&str])
Asserts entire buffer lines match expected strings (trailing spaces trimmed).
Auto Trait Implementations§
impl Freeze for TestBuffer
impl RefUnwindSafe for TestBuffer
impl Send for TestBuffer
impl Sync for TestBuffer
impl Unpin for TestBuffer
impl UnsafeUnpin for TestBuffer
impl UnwindSafe for TestBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more