(size: u16)
| 1562 | // value (write offset) is `EOF - buffer_size` (0 in this case) |
| 1563 | #[quickcheck] |
| 1564 | fn prop_write_with_cursor(size: u16) -> bool { |
| 1565 | let bufsize = size as usize; |
| 1566 | let file = create_tmp_file_of_size(0).unwrap(); |
| 1567 | let bufman = BufferManager::new(file, BUFFER_SIZE).unwrap(); |
| 1568 | let buffer = vec![0; bufsize]; |
| 1569 | let cursor = bufman.open_cursor().unwrap(); |
| 1570 | let written_at = bufman.write_with_cursor(cursor, &buffer[..], true).unwrap(); |
| 1571 | bufman.close_cursor(cursor).unwrap(); |
| 1572 | written_at == 0 |
| 1573 | } |
| 1574 | |
| 1575 | // Prop test for `write_with_cursor` to check that all regions |
| 1576 | // that are written to are dirty |
nothing calls this directly
no test coverage detected