Function common_testing::assert::cursor_completely_consumed
source · pub fn cursor_completely_consumed<T>(cursor: &Cursor<T>)
Expand description
Asserts cursor position has reached the end. This is useful for testing that a cursor has been completely consumed.
Example
use std::io::Cursor;
use common_testing::assert;
#[test]
fn test_1() {
let cursor = Cursor::new("abc");
assert::cursor_completely_consumed(&cursor);
}