()
| 323 | |
| 324 | #[test] |
| 325 | fn read_single_file() { |
| 326 | let dir = tempfile::tempdir().unwrap(); |
| 327 | let path = create_test_file(dir.path(), "test.col", 8192); |
| 328 | |
| 329 | let mut reader = UringReader::with_config(8, 4, 16384).unwrap(); |
| 330 | let results = reader.read_files(&[path.as_path()]); |
| 331 | assert_eq!(results.len(), 1); |
| 332 | assert_eq!(results[0].len(), 8192); |
| 333 | for (i, &b) in results[0].iter().enumerate() { |
| 334 | assert_eq!(b, (i % 256) as u8, "mismatch at byte {i}"); |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | #[test] |
| 339 | fn read_multiple_files_batched() { |
nothing calls this directly
no test coverage detected