Skip to content

Commit 77b3aa8

Browse files
committed
test(sdk): Test the RoomEvents' methods.
This patch adds unit tests for the `RoomEvents`' methods.
1 parent cf7cb5c commit 77b3aa8

File tree

2 files changed

+390
-0
lines changed

2 files changed

+390
-0
lines changed

crates/matrix-sdk/src/event_cache/linked_chunk/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,13 @@ impl ChunkIdentifierGenerator {
852852
#[repr(transparent)]
853853
pub struct ChunkIdentifier(u64);
854854

855+
#[cfg(test)]
856+
impl PartialEq<u64> for ChunkIdentifier {
857+
fn eq(&self, other: &u64) -> bool {
858+
self.0 == *other
859+
}
860+
}
861+
855862
/// The position of something inside a [`Chunk`].
856863
///
857864
/// It's a pair of a chunk position and an item index.

0 commit comments

Comments
 (0)