Skip to content

Commit 9e445e0

Browse files
committed
Add assert checking for used indices in mock remote interface paginated propfinds
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
1 parent 8fee54c commit 9e445e0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Tests/Interface/MockRemoteInterface.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,7 @@ public class MockRemoteInterface: RemoteInterface {
10831083
}
10841084
let reachedEnd = firstItem + itemCount >= files.count
10851085
let lastItem = min(firstItem + itemCount, files.count) - 1
1086+
assert(firstItem <= lastItem)
10861087
let itemsPage = Array(files[firstItem...lastItem])
10871088
let responseData = generateResponse(itemCount: files.count, finalPage: reachedEnd)
10881089
return (account.ncKitAccount, itemsPage, responseData, .success)

0 commit comments

Comments
 (0)