Tests for KT-64640

Add test for other collections with (add/remove)(First/Last) methods. Add test for LinkedHashMap.put(First/Last) methods (they are also appeared in Java 21)
This commit is contained in:
anzhela.sukhanova
2024-01-09 18:34:22 +02:00
committed by Space Team
parent b7fbfb2fde
commit 741c8eeba5
3 changed files with 50 additions and 0 deletions
@@ -19,3 +19,21 @@ fun baz(x: ArrayDeque<String>, y: LinkedHashSet<String>) {
y.removeFirst()
y.removeLast()
}
// Test for collections with (add/remove)(First/Last) methods which are not covered by autotests
fun foo(x: java.util.SequencedCollection<String>, y: java.util.SequencedSet<String>, z: java.util.Deque<String>) {
x.addFirst("")
x.addLast("")
x.removeFirst()
x.removeLast()
y.addFirst("")
y.addLast("")
y.removeFirst()
y.removeLast()
z.addFirst("")
z.addLast("")
z.removeFirst()
z.removeLast()
}