Skip to content

Commit

Permalink
test(sdk): Test the RoomEvents' methods.
Browse files Browse the repository at this point in the history
This patch adds unit tests for the `RoomEvents`' methods.
  • Loading branch information
Hywan committed Oct 28, 2024
1 parent cf7cb5c commit 77b3aa8
Show file tree
Hide file tree
Showing 2 changed files with 390 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/matrix-sdk/src/event_cache/linked_chunk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,13 @@ impl ChunkIdentifierGenerator {
#[repr(transparent)]
pub struct ChunkIdentifier(u64);

#[cfg(test)]
impl PartialEq<u64> for ChunkIdentifier {
fn eq(&self, other: &u64) -> bool {
self.0 == *other
}
}

/// The position of something inside a [`Chunk`].
///
/// It's a pair of a chunk position and an item index.
Expand Down
Loading

0 comments on commit 77b3aa8

Please sign in to comment.