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:
committed by
Space Team
parent
b7fbfb2fde
commit
741c8eeba5
+18
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user