WindowIterator should emit items in order when scrolling backwards.
Closes #2857 Original pull request: #2858
This commit is contained in:
committed by
Mark Paluch
parent
4e3c06dbb8
commit
8671c00e05
@@ -131,7 +131,7 @@ class WindowIteratorUnitTests {
|
||||
assertThat(capturedResult).containsExactly("a", "b", "c", "d");
|
||||
}
|
||||
|
||||
@Test // GH-2151
|
||||
@Test // GH-2151, GH-2857
|
||||
void considersBackwardKeysetScrolling() {
|
||||
|
||||
Window<String> initial = Window.from(List.of("c", "d"),
|
||||
@@ -152,6 +152,6 @@ class WindowIteratorUnitTests {
|
||||
}).startingAt(ScrollPosition.keyset().backward());
|
||||
|
||||
List<String> items = Streamable.of(() -> iterator).toList();
|
||||
assertThat(items).containsExactly("c", "d", "a", "b");
|
||||
assertThat(items).containsExactly("d", "c", "b", "a");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user