[stream-debugger] Update tests for Java 17

skip and limit preserve SIZED in Java 17 and count() doesn't actually consume the stream, so Stream debugger cannot traverse the stream

GitOrigin-RevId: b12e6b6110bbf60b36ac6f928d5348db5f676c3a
This commit is contained in:
Tagir Valeev
2022-01-12 14:54:03 +00:00
committed by intellij-monorepo-bot
parent f199980591
commit 41b1078ec1
4 changed files with 14 additions and 14 deletions
@@ -4,23 +4,23 @@ Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socke
Limit.java:6
Stream.of(1, 2, 3)
.limit(1)
.count()
.toArray()
limit
before: 1
after: 2
count
toArray
before: 2
after: nothing
after: 3
mappings for limit
direct:
1 -> 2
reverse:
1 <- 2
mappings for count
mappings for toArray
direct:
2 -> nothing
2 -> 3
reverse:
empty
2 <- 3
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -4,13 +4,13 @@ Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socke
Skip.java:6
Stream.of(1, 2, 3)
.skip(2)
.count()
.toArray()
skip
before: 1,2,3
after: 4
count
toArray
before: 4
after: nothing
after: 5
mappings for skip
direct:
1 -> nothing
@@ -18,11 +18,11 @@ mappings for skip
3 -> 4
reverse:
3 <- 4
mappings for count
mappings for toArray
direct:
4 -> nothing
4 -> 5
reverse:
empty
4 <- 5
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -3,6 +3,6 @@ import java.util.stream.Stream;
public class Limit {
public static void main(String[] args) {
// Breakpoint!
final long res = Stream.of(1, 2, 3).limit(1).count();
Object[] res = Stream.of(1, 2, 3).limit(1).toArray();
}
}
@@ -3,6 +3,6 @@ import java.util.stream.Stream;
public class Skip {
public static void main(String[] args) {
// Breakpoint!
final long res = Stream.of(1, 2, 3).skip(2).count();
Object[] res = Stream.of(1, 2, 3).skip(2).toArray();
}
}