From c62060dcada2bc89dcf8674a06707f748de95a33 Mon Sep 17 00:00:00 2001 From: nibon7 Date: Wed, 10 Jan 2024 01:08:31 +0800 Subject: [PATCH] add test --- src/history/base.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/history/base.rs b/src/history/base.rs index 26d4da05..b5af8305 100644 --- a/src/history/base.rs +++ b/src/history/base.rs @@ -427,4 +427,13 @@ mod test { Ok(()) } + + #[test] + fn create_file_backed_history() { + use crate::HISTORY_SIZE; + + assert!(crate::FileBackedHistory::new(0).is_err()); + assert!(crate::FileBackedHistory::new(usize::MAX).is_err()); + assert!(crate::FileBackedHistory::new(HISTORY_SIZE).is_ok()); + } }