test(pdftract-1uhee): fix MmapSource test assertions
- test_open_valid_file: byte string is 22 bytes, not 20 - test_seek_from_end: seeking -2 from end of "Hello" gives "lo", not "el" The MmapSource implementation was already complete with all acceptance criteria met: - open() returns Ok/Err appropriately - read_range() with bounds checking - len() matches file size - Read+Seek trait implementations - Send + Sync for concurrent access - MADV_SEQUENTIAL via advise_sequential() Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
ae9e478405
commit
ba5d101840
1 changed files with 2 additions and 2 deletions
|
|
@ -187,7 +187,7 @@ mod tests {
|
||||||
temp_file.write_all(b"%PDF-1.4\ntest content\n").unwrap();
|
temp_file.write_all(b"%PDF-1.4\ntest content\n").unwrap();
|
||||||
|
|
||||||
let source = MmapSource::open(temp_file.path()).unwrap();
|
let source = MmapSource::open(temp_file.path()).unwrap();
|
||||||
assert_eq!(source.len(), 20);
|
assert_eq!(source.len(), 22);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
@ -291,7 +291,7 @@ mod tests {
|
||||||
source.seek(SeekFrom::End(-2)).unwrap();
|
source.seek(SeekFrom::End(-2)).unwrap();
|
||||||
let mut buf = [0u8; 2];
|
let mut buf = [0u8; 2];
|
||||||
source.read_exact(&mut buf).unwrap();
|
source.read_exact(&mut buf).unwrap();
|
||||||
assert_eq!(&buf, b"el");
|
assert_eq!(&buf, b"lo");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue