Documentation ¶
Index ¶
- func CheckList(i int, res sync3.ResponseList, matchers ...ListMatcher) error
- func CheckRoom(r sync3.Room, matchers ...RoomMatcher) error
- func EqualAnyOrder(got, want []json.RawMessage) error
- func MatchResponse(t *testing.T, res *sync3.Response, matchers ...RespMatcher)
- type ListMatcher
- type OpMatcher
- func MatchV3DeleteOp(roomIndex int) OpMatcher
- func MatchV3InsertOp(roomIndex int, roomID string) OpMatcher
- func MatchV3InvalidateOp(start, end int64) OpMatcher
- func MatchV3SyncOp(start, end int64, roomIDs []string, anyOrder ...bool) OpMatcher
- func MatchV3SyncOpFn(fn func(op *sync3.ResponseOpRange) error) OpMatcher
- type RespMatcher
- func MatchAccountData(globals []json.RawMessage, rooms map[string][]json.RawMessage) RespMatcher
- func MatchDeviceLists(changed, left []string) RespMatcher
- func MatchFallbackKeyTypes(fallbackKeyTypes []string) RespMatcher
- func MatchList(i int, matchers ...ListMatcher) RespMatcher
- func MatchLists(matchers ...[]ListMatcher) RespMatcher
- func MatchNoV3Ops() RespMatcher
- func MatchOTKCounts(otkCounts map[string]int) RespMatcher
- func MatchRoomSubscription(roomID string, matchers ...RoomMatcher) RespMatcher
- func MatchRoomSubscriptions(wantSubs map[string][]RoomMatcher) RespMatcher
- func MatchRoomSubscriptionsStrict(wantSubs map[string][]RoomMatcher) RespMatcher
- func MatchToDeviceMessages(wantMsgs []json.RawMessage) RespMatcher
- func MatchTxnID(txnID string) RespMatcher
- type RoomMatcher
- func MatchRoomHighlightCount(count int64) RoomMatcher
- func MatchRoomInitial(initial bool) RoomMatcher
- func MatchRoomInviteState(events []json.RawMessage) RoomMatcher
- func MatchRoomName(name string) RoomMatcher
- func MatchRoomNotificationCount(count int64) RoomMatcher
- func MatchRoomPrevBatch(prevBatch string) RoomMatcher
- func MatchRoomRequiredState(events []json.RawMessage) RoomMatcher
- func MatchRoomTimeline(events []json.RawMessage) RoomMatcher
- func MatchRoomTimelineMostRecent(n int, events []json.RawMessage) RoomMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckList ¶
func CheckList(i int, res sync3.ResponseList, matchers ...ListMatcher) error
func EqualAnyOrder ¶
func EqualAnyOrder(got, want []json.RawMessage) error
func MatchResponse ¶
func MatchResponse(t *testing.T, res *sync3.Response, matchers ...RespMatcher)
Types ¶
type ListMatcher ¶
type ListMatcher func(list sync3.ResponseList) error
func MatchV3Count ¶
func MatchV3Count(wantCount int) ListMatcher
func MatchV3Ops ¶
func MatchV3Ops(matchOps ...OpMatcher) ListMatcher
type OpMatcher ¶
type OpMatcher func(op sync3.ResponseOp) error
func MatchV3DeleteOp ¶
func MatchV3InsertOp ¶
func MatchV3InvalidateOp ¶
func MatchV3SyncOp ¶
func MatchV3SyncOpFn ¶
func MatchV3SyncOpFn(fn func(op *sync3.ResponseOpRange) error) OpMatcher
type RespMatcher ¶
func MatchAccountData ¶
func MatchAccountData(globals []json.RawMessage, rooms map[string][]json.RawMessage) RespMatcher
func MatchDeviceLists ¶
func MatchDeviceLists(changed, left []string) RespMatcher
func MatchFallbackKeyTypes ¶ added in v0.3.1
func MatchFallbackKeyTypes(fallbackKeyTypes []string) RespMatcher
func MatchList ¶
func MatchList(i int, matchers ...ListMatcher) RespMatcher
func MatchLists ¶
func MatchLists(matchers ...[]ListMatcher) RespMatcher
func MatchNoV3Ops ¶
func MatchNoV3Ops() RespMatcher
func MatchOTKCounts ¶
func MatchOTKCounts(otkCounts map[string]int) RespMatcher
func MatchRoomSubscription ¶
func MatchRoomSubscription(roomID string, matchers ...RoomMatcher) RespMatcher
func MatchRoomSubscriptions ¶
func MatchRoomSubscriptions(wantSubs map[string][]RoomMatcher) RespMatcher
func MatchRoomSubscriptionsStrict ¶
func MatchRoomSubscriptionsStrict(wantSubs map[string][]RoomMatcher) RespMatcher
func MatchToDeviceMessages ¶
func MatchToDeviceMessages(wantMsgs []json.RawMessage) RespMatcher
func MatchTxnID ¶ added in v0.3.0
func MatchTxnID(txnID string) RespMatcher
type RoomMatcher ¶
func MatchRoomHighlightCount ¶
func MatchRoomHighlightCount(count int64) RoomMatcher
func MatchRoomInitial ¶
func MatchRoomInitial(initial bool) RoomMatcher
func MatchRoomInviteState ¶
func MatchRoomInviteState(events []json.RawMessage) RoomMatcher
func MatchRoomName ¶
func MatchRoomName(name string) RoomMatcher
func MatchRoomNotificationCount ¶
func MatchRoomNotificationCount(count int64) RoomMatcher
func MatchRoomPrevBatch ¶
func MatchRoomPrevBatch(prevBatch string) RoomMatcher
func MatchRoomRequiredState ¶
func MatchRoomRequiredState(events []json.RawMessage) RoomMatcher
func MatchRoomTimeline ¶
func MatchRoomTimeline(events []json.RawMessage) RoomMatcher
Match the timeline with exactly these events in exactly this order
func MatchRoomTimelineMostRecent ¶
func MatchRoomTimelineMostRecent(n int, events []json.RawMessage) RoomMatcher
Similar to MatchRoomTimeline but takes the last n events of `events` and only checks with the last n events of the timeline.
Click to show internal directories.
Click to hide internal directories.