()
| 464 | } |
| 465 | |
| 466 | /// Assert that the reader will return an error when it tries to open a file that is empty. |
| 467 | #[test] |
| 468 | fn test_reader_file_is_empty() { |
| 469 | let vmclock_shm_tempfile = NamedTempFile::new().expect("create vmclock file failed"); |
| 470 | let vmclock_shm_temppath = vmclock_shm_tempfile.into_temp_path(); |
| 471 | let vmclock_shm_path = vmclock_shm_temppath.to_str().unwrap(); |
| 472 | |
| 473 | assert!(VMClockShmReader::new(&vmclock_shm_path).is_err()); |
| 474 | } |
| 475 |