From f20664e4ca6d1d59e201ef1d344b6f7050a94bcd Mon Sep 17 00:00:00 2001 From: Al Liu Date: Sat, 14 Sep 2024 02:03:30 +0800 Subject: [PATCH] WIP --- src/tests.rs | 4 ++-- src/unsync/tests.rs | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tests.rs b/src/tests.rs index e85e5f26..92635ef0 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -783,8 +783,8 @@ pub(crate) fn last>(wal: &mut W) { } let (key, value) = wal.last().unwrap(); - assert_eq!(key, 999u32.to_be_bytes()); - assert_eq!(value, 999u32.to_be_bytes()); + assert_eq!(key, 99u32.to_be_bytes()); + assert_eq!(value, 99u32.to_be_bytes()); } pub(crate) fn get_or_insert>(wal: &mut W) { diff --git a/src/unsync/tests.rs b/src/unsync/tests.rs index ee419731..31b4e0db 100644 --- a/src/unsync/tests.rs +++ b/src/unsync/tests.rs @@ -7,3 +7,8 @@ use super::*; const MB: u32 = 1024 * 1024; common_unittests!(unsync::OrderWal); + +#[test] +fn test_last_inmemory1() { + last(&mut OrderWal::new(Builder::new().with_capacity(MB)).unwrap()); +}