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 22, 2024
1 parent 45a65b3 commit 97b88ed
Show file tree
Hide file tree
Showing 2 changed files with 392 additions and 0 deletions.
6 changes: 6 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,12 @@ impl ChunkIdentifierGenerator {
#[repr(transparent)]
pub struct ChunkIdentifier(u64);

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 97b88ed

Please sign in to comment.