Move test data to tinyApp directory

This commit is contained in:
Vitaliy.Bibaev
2018-06-07 19:57:05 +03:00
committed by Yan Zhulanow
parent ac4c42cc4b
commit 895e78d180
198 changed files with 132 additions and 99 deletions
@@ -0,0 +1,6 @@
package append
fun main(args: Array<String>) {
//Breakpoint!
listOf(1, 2, 3).asSequence().plus(arrayOf(3, 4, 5)).count()
}
@@ -0,0 +1,6 @@
package append
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 2).plusElement(10).count()
}
@@ -0,0 +1,6 @@
package append
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(10, 20).plus(sequenceOf(30, 40)).count()
}
@@ -0,0 +1,6 @@
package append
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(10, 20).plus(30).count()
}
@@ -0,0 +1,38 @@
LineBreakpoint created at PlusArray.kt:5
Run Java
Connected to the target VM
PlusArray.kt:5
listOf(1, 2, 3).asSequence()
.plus(arrayOf(3, 4, 5))
.count()
plus
before: 1,3,5
after: 2,4,6,7,8,9
count
before: 2,4,6,7,8,9
after: nothing
mappings for plus
direct:
1 -> 2
3 -> 4
5 -> 6
reverse:
1 <- 2
3 <- 4
5 <- 6
nothing <- 7
nothing <- 8
nothing <- 9
mappings for count
direct:
2 -> nothing
4 -> nothing
6 -> nothing
7 -> nothing
8 -> nothing
9 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,31 @@
LineBreakpoint created at PlusElement.kt:5
Run Java
Connected to the target VM
PlusElement.kt:5
sequenceOf(1, 2)
.plusElement(10)
.count()
plusElement
before: 1,3
after: 2,4,5
count
before: 2,4,5
after: nothing
mappings for plusElement
direct:
1 -> 2
3 -> 4
reverse:
1 <- 2
3 <- 4
nothing <- 5
mappings for count
direct:
2 -> nothing
4 -> nothing
5 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,33 @@
LineBreakpoint created at PlusSequence.kt:5
Run Java
Connected to the target VM
PlusSequence.kt:5
sequenceOf(10, 20)
.plus(sequenceOf(30, 40))
.count()
plus
before: 1,3
after: 2,4,5,6
count
before: 2,4,5,6
after: nothing
mappings for plus
direct:
1 -> 2
3 -> 4
reverse:
1 <- 2
3 <- 4
nothing <- 5
nothing <- 6
mappings for count
direct:
2 -> nothing
4 -> nothing
5 -> nothing
6 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,31 @@
LineBreakpoint created at PlusSingle.kt:5
Run Java
Connected to the target VM
PlusSingle.kt:5
sequenceOf(10, 20)
.plus(30)
.count()
plus
before: 1,3
after: 2,4,5
count
before: 2,4,5
after: nothing
mappings for plus
direct:
1 -> 2
3 -> 4
reverse:
1 <- 2
3 <- 4
nothing <- 5
mappings for count
direct:
2 -> nothing
4 -> nothing
5 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,6 @@
package distinct
fun main(args: Array<String>) {
//Breakpoint!
listOf(1, 2, 3, 2, 1, 3, 4, 2).asSequence().distinct().count()
}
@@ -0,0 +1,6 @@
package distinct
fun main(args: Array<String>) {
//Breakpoint!
listOf(3, 4, 234, 34, 54, 23, 4, 23, 543, 5, 46).asSequence().distinctBy { it % 10 }.toList()
}
@@ -0,0 +1,8 @@
package distinct
fun main(args: Array<String>) {
//Breakpoint!
val seq = (22..25).map { it * it }.asSequence()
.distinctBy { it.toString().first() }
.count()
}
@@ -0,0 +1,6 @@
package distinct
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(null, 1, 2, 3, null).distinctBy { it == null }.count()
}
@@ -0,0 +1,6 @@
package distinct
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 2, 3, 4, 5).distinctBy { if (it % 2 == 0) null else it }.count()
}
@@ -0,0 +1,6 @@
package distinct
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 2, null, null, 3, 1).distinctBy { if (it == null) 2 else if (it == 3) null else it }.count()
}
@@ -0,0 +1,7 @@
package distinct
fun main(args: Array<String>) {
fun str(chr: Char): String = String(charArrayOf(chr))
//Breakpoint!
listOf(str('a'), str('b'), str('a'), str('c'), str('b')).asSequence().distinct().count()
}
@@ -0,0 +1,39 @@
LineBreakpoint created at Distinct.kt:5
Run Java
Connected to the target VM
Distinct.kt:5
listOf(1, 2, 3, 2, 1, 3, 4, 2).asSequence()
.distinct()
.count()
distinct
before: 1,3,5,7,8,9,10,12
after: 2,4,6,11
count
before: 2,4,6,11
after: nothing
mappings for distinct
direct:
1 -> 2
3 -> 4
5 -> 6
7 -> 4
8 -> 2
9 -> 6
10 -> 11
12 -> 4
reverse:
1,8 <- 2
3,7,12 <- 4
5,9 <- 6
10 <- 11
mappings for count
direct:
2 -> nothing
4 -> nothing
6 -> nothing
11 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,42 @@
LineBreakpoint created at DistinctBy.kt:5
Run Java
Connected to the target VM
DistinctBy.kt:5
listOf(3, 4, 234, 34, 54, 23, 4, 23, 543, 5, 46).asSequence()
.distinctBy({ it % 10 })
.toList()
distinctBy
before: 1,3,5,6,7,8,9,10,11,12,14
after: 2,4,13,15
toList
before: 2,4,13,15
after: nothing
mappings for distinctBy
direct:
1 -> 2
3 -> 4
5 -> 4
6 -> 4
7 -> 4
8 -> 2
9 -> 4
10 -> 2
11 -> 2
12 -> 13
14 -> 15
reverse:
1,8,10,11 <- 2
3,5,6,7,9 <- 4
12 <- 13
14 <- 15
mappings for toList
direct:
2 -> nothing
4 -> nothing
13 -> nothing
15 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,33 @@
LineBreakpoint created at DistinctByBigPrimitives.kt:5
Run Java
Connected to the target VM
DistinctByBigPrimitives.kt:5
(22..25).map { it * it }.asSequence()
.distinctBy({ it.toString().first() })
.count()
distinctBy
before: 1,3,5,6
after: 2,4,7
count
before: 2,4,7
after: nothing
mappings for distinctBy
direct:
1 -> 2
3 -> 4
5 -> 4
6 -> 7
reverse:
1 <- 2
3,5 <- 4
6 <- 7
mappings for count
direct:
2 -> nothing
4 -> nothing
7 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,32 @@
LineBreakpoint created at DistinctByNullableElement.kt:5
Run Java
Connected to the target VM
DistinctByNullableElement.kt:5
sequenceOf(null, 1, 2, 3, null)
.distinctBy({ it == null })
.count()
distinctBy
before: 1,3,5,6,7
after: 2,4
count
before: 2,4
after: nothing
mappings for distinctBy
direct:
1 -> 2
3 -> 4
5 -> 4
6 -> 4
7 -> 2
reverse:
1,7 <- 2
3,5,6 <- 4
mappings for count
direct:
2 -> nothing
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,36 @@
LineBreakpoint created at DistinctByNullableKey.kt:5
Run Java
Connected to the target VM
DistinctByNullableKey.kt:5
sequenceOf(1, 2, 3, 4, 5)
.distinctBy({ if (it % 2 == 0) null else it })
.count()
distinctBy
before: 1,3,5,7,8
after: 2,4,6,9
count
before: 2,4,6,9
after: nothing
mappings for distinctBy
direct:
1 -> 2
3 -> 4
5 -> 6
7 -> 4
8 -> 9
reverse:
1 <- 2
3,7 <- 4
5 <- 6
8 <- 9
mappings for count
direct:
2 -> nothing
4 -> nothing
6 -> nothing
9 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,35 @@
LineBreakpoint created at DistinctByNullableKeyAndElement.kt:5
Run Java
Connected to the target VM
DistinctByNullableKeyAndElement.kt:5
sequenceOf(1, 2, null, null, 3, 1)
.distinctBy({ if (it == null) 2 else if (it == 3) null else it })
.count()
distinctBy
before: 1,3,5,6,7,9
after: 2,4,8
count
before: 2,4,8
after: nothing
mappings for distinctBy
direct:
1 -> 2
3 -> 4
5 -> 4
6 -> 4
7 -> 8
9 -> 2
reverse:
1,9 <- 2
3,5,6 <- 4
7 <- 8
mappings for count
direct:
2 -> nothing
4 -> nothing
8 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,34 @@
LineBreakpoint created at DistinctObjects.kt:6
Run Java
Connected to the target VM
DistinctObjects.kt:6
listOf(str('a'), str('b'), str('a'), str('c'), str('b')).asSequence()
.distinct()
.count()
distinct
before: 1,3,5,6,8
after: 2,4,7
count
before: 2,4,7
after: nothing
mappings for distinct
direct:
1 -> 2
3 -> 4
5 -> 2
6 -> 7
8 -> 4
reverse:
1,5 <- 2
3,8 <- 4
6 <- 7
mappings for count
direct:
2 -> nothing
4 -> nothing
7 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,6 @@
package filter
fun main(args: Array<String>) {
//Breakpoint!
listOf(1, 2, 3).asSequence().drop(2).count()
}
@@ -0,0 +1,6 @@
package filter
fun main(args: Array<String>) {
//Breakpoint!
listOf("abs", "bcs", "abt").asSequence().dropWhile { it.startsWith('a') }.forEach {}
}
@@ -0,0 +1,6 @@
package filter
fun main(args: Array<String>) {
//Breakpoint!
listOf(1,2,3).asSequence().filter { it == 2 }.count()
}
@@ -0,0 +1,6 @@
package filter
fun main(args: Array<String>) {
//Breakpoint!
intArrayOf(1, 2, 3).asSequence().filterIndexed({ index, _ -> index % 2 == 0 }).count()
}
@@ -0,0 +1,6 @@
package filter
fun main(args: Array<String>) {
//Breakpoint!
arrayOf(true, "12", false).asSequence().filterIsInstance<Boolean>().forEach {}
}
@@ -0,0 +1,6 @@
package filter
fun main(args: Array<String>) {
//Breakpoint!
booleanArrayOf(true, false, false).asSequence().filterNot { it }.lastIndexOf(true)
}
@@ -0,0 +1,6 @@
package filter
fun main(args: Array<String>) {
//Breakpoint!
byteArrayOf(1, 2, 3, 2).asSequence().minus(arrayOf(2.toByte())).count()
}
@@ -0,0 +1,6 @@
package filter
fun main(args: Array<String>) {
//Breakpoint!
byteArrayOf(1, 2, 3, 2).asSequence().minusElement(2.toByte()).count()
}
@@ -0,0 +1,6 @@
package filter
fun main(args: Array<String>) {
//Breakpoint!
charArrayOf('a', 'b', 'c').asSequence().take(2).count()
}
@@ -0,0 +1,6 @@
package filter
fun main(args: Array<String>) {
//Breakpoint!
doubleArrayOf(1.0, 3.0, 5.0).asSequence().takeWhile { it < 2 }.forEach {}
}
@@ -0,0 +1,28 @@
LineBreakpoint created at Drop.kt:5
Run Java
Connected to the target VM
Drop.kt:5
listOf(1, 2, 3).asSequence()
.drop(2)
.count()
drop
before: 1,2,3
after: 4
count
before: 4
after: nothing
mappings for drop
direct:
1 -> nothing
2 -> nothing
3 -> 4
reverse:
3 <- 4
mappings for count
direct:
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,30 @@
LineBreakpoint created at DropWhile.kt:5
Run Java
Connected to the target VM
DropWhile.kt:5
listOf("abs", "bcs", "abt").asSequence()
.dropWhile({ it.startsWith('a') })
.forEach({})
dropWhile
before: 1,2,4
after: 3,5
forEach
before: 3,5
after: nothing
mappings for dropWhile
direct:
1 -> nothing
2 -> 3
4 -> 5
reverse:
2 <- 3
4 <- 5
mappings for forEach
direct:
3 -> nothing
5 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,28 @@
LineBreakpoint created at Filter.kt:5
Run Java
Connected to the target VM
Filter.kt:5
listOf(1,2,3).asSequence()
.filter({ it == 2 })
.count()
filter
before: 1,2,4
after: 3
count
before: 3
after: nothing
mappings for filter
direct:
1 -> nothing
2 -> 3
4 -> nothing
reverse:
2 <- 3
mappings for count
direct:
3 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,30 @@
LineBreakpoint created at FilterIndexed.kt:5
Run Java
Connected to the target VM
FilterIndexed.kt:5
intArrayOf(1, 2, 3).asSequence()
.filterIndexed({ index, _ -> index % 2 == 0 })
.count()
filterIndexed
before: 1,3,4
after: 2,5
count
before: 2,5
after: nothing
mappings for filterIndexed
direct:
1 -> 2
3 -> nothing
4 -> 5
reverse:
1 <- 2
4 <- 5
mappings for count
direct:
2 -> nothing
5 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,30 @@
LineBreakpoint created at FilterIsInstance.kt:5
Run Java
Connected to the target VM
FilterIsInstance.kt:5
arrayOf(true, "12", false).asSequence()
.filterIsInstance()
.forEach({})
filterIsInstance
before: 1,3,4
after: 2,5
forEach
before: 2,5
after: nothing
mappings for filterIsInstance
direct:
1 -> 2
3 -> nothing
4 -> 5
reverse:
1 <- 2
4 <- 5
mappings for forEach
direct:
2 -> nothing
5 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,30 @@
LineBreakpoint created at FilterNot.kt:5
Run Java
Connected to the target VM
FilterNot.kt:5
booleanArrayOf(true, false, false).asSequence()
.filterNot({ it })
.lastIndexOf(true)
filterNot
before: 1,2,4
after: 3,5
lastIndexOf
before: 3,5
after: nothing
mappings for filterNot
direct:
1 -> nothing
2 -> 3
4 -> 5
reverse:
2 <- 3
4 <- 5
mappings for lastIndexOf
direct:
3 -> nothing
5 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,31 @@
LineBreakpoint created at Minus.kt:5
Run Java
Connected to the target VM
Minus.kt:5
byteArrayOf(1, 2, 3, 2).asSequence()
.minus(arrayOf(2.toByte()))
.count()
minus
before: 1,3,4,6
after: 2,5
count
before: 2,5
after: nothing
mappings for minus
direct:
1 -> 2
3 -> nothing
4 -> 5
6 -> nothing
reverse:
1 <- 2
4 <- 5
mappings for count
direct:
2 -> nothing
5 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,33 @@
LineBreakpoint created at MinusElement.kt:5
Run Java
Connected to the target VM
MinusElement.kt:5
byteArrayOf(1, 2, 3, 2).asSequence()
.minusElement(2.toByte())
.count()
minusElement
before: 1,3,4,6
after: 2,5,7
count
before: 2,5,7
after: nothing
mappings for minusElement
direct:
1 -> 2
3 -> nothing
4 -> 5
6 -> 7
reverse:
1 <- 2
4 <- 5
6 <- 7
mappings for count
direct:
2 -> nothing
5 -> nothing
7 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
LineBreakpoint created at Take.kt:5
Run Java
Connected to the target VM
Take.kt:5
charArrayOf('a', 'b', 'c').asSequence()
.take(2)
.count()
take
before: 1,3
after: 2,4
count
before: 2,4
after: nothing
mappings for take
direct:
1 -> 2
3 -> 4
reverse:
1 <- 2
3 <- 4
mappings for count
direct:
2 -> nothing
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,27 @@
LineBreakpoint created at TakeWhile.kt:5
Run Java
Connected to the target VM
TakeWhile.kt:5
doubleArrayOf(1.0, 3.0, 5.0).asSequence()
.takeWhile({ it < 2 })
.forEach({})
takeWhile
before: 1,3
after: 2
forEach
before: 2
after: nothing
mappings for takeWhile
direct:
1 -> 2
3 -> nothing
reverse:
1 <- 2
mappings for forEach
direct:
2 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,6 @@
package flatMap
fun main(args: Array<String>) {
//Breakpoint!
listOf(1, 0, 2).asSequence().flatMap { (0 until it).asSequence() }.count()
}
@@ -0,0 +1,6 @@
package flatMap
fun main(args: Array<String>) {
//Breakpoint!
listOf(listOf(1,2,3), listOf(), listOf(4,5,6)).asSequence().flatten().toList()
}
@@ -0,0 +1,32 @@
LineBreakpoint created at FlatMap.kt:5
Run Java
Connected to the target VM
FlatMap.kt:5
listOf(1, 0, 2).asSequence()
.flatMap({ (0 until it).asSequence() })
.count()
flatMap
before: 1,3,4
after: 2,5,6
count
before: 2,5,6
after: nothing
mappings for flatMap
direct:
1 -> 2
3 -> nothing
4 -> 5,6
reverse:
1 <- 2
4 <- 5
4 <- 6
mappings for count
direct:
2 -> nothing
5 -> nothing
6 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,38 @@
LineBreakpoint created at Flatten.kt:5
Run Java
Connected to the target VM
Flatten.kt:5
listOf(listOf(1,2,3), listOf(), listOf(4,5,6)).asSequence()
.flatten()
.toList()
flatten
before: 1,5,6
after: 2,3,4,7,8,9
toList
before: 2,3,4,7,8,9
after: nothing
mappings for flatten
direct:
1 -> 2,3,4
5 -> nothing
6 -> 7,8,9
reverse:
1 <- 2
1 <- 3
1 <- 4
6 <- 7
6 <- 8
6 <- 9
mappings for toList
direct:
2 -> nothing
3 -> nothing
4 -> nothing
7 -> nothing
8 -> nothing
9 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,6 @@
package map
fun main(args: Array<String>) {
//Breakpoint!
doubleArrayOf(1.0, 2.0).asSequence().map { it * it }.contains(3.0)
}
@@ -0,0 +1,6 @@
package map
fun main(args: Array<String>) {
//Breakpoint!
intArrayOf(1, 2, 3, 4).asSequence().mapIndexed { ix, _ -> ix }.count()
}
@@ -0,0 +1,6 @@
package map
fun main(args: Array<String>) {
//Breakpoint!
val lst = listOf(1, 2, null, 3).asSequence().mapNotNull { if (it != null && it % 2 == 1) it else null }.toList()
}
@@ -0,0 +1,6 @@
package map
fun main(args: Array<String>) {
//Breakpoint!
intArrayOf(1, 2, 3).asSequence().withIndex().forEach {}
}
+29
View File
@@ -0,0 +1,29 @@
LineBreakpoint created at Map.kt:5
Run Java
Connected to the target VM
Map.kt:5
doubleArrayOf(1.0, 2.0).asSequence()
.map({ it * it })
.contains(3.0)
map
before: 1,3
after: 2,4
contains
before: 2,4
after: nothing
mappings for map
direct:
1 -> 2
3 -> 4
reverse:
1 <- 2
3 <- 4
mappings for contains
direct:
2 -> nothing
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,35 @@
LineBreakpoint created at MapIndexed.kt:5
Run Java
Connected to the target VM
MapIndexed.kt:5
intArrayOf(1, 2, 3, 4).asSequence()
.mapIndexed({ ix, _ -> ix })
.count()
mapIndexed
before: 1,3,5,7
after: 2,4,6,8
count
before: 2,4,6,8
after: nothing
mappings for mapIndexed
direct:
1 -> 2
3 -> 4
5 -> 6
7 -> 8
reverse:
1 <- 2
3 <- 4
5 <- 6
7 <- 8
mappings for count
direct:
2 -> nothing
4 -> nothing
6 -> nothing
8 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,31 @@
LineBreakpoint created at MapNotNull.kt:5
Run Java
Connected to the target VM
MapNotNull.kt:5
listOf(1, 2, null, 3).asSequence()
.mapNotNull({ if (it != null && it % 2 == 1) it else null })
.toList()
mapNotNull
before: 1,3,4,5
after: 2,6
toList
before: 2,6
after: nothing
mappings for mapNotNull
direct:
1 -> 2
3 -> nothing
4 -> nothing
5 -> 6
reverse:
1 <- 2
5 <- 6
mappings for toList
direct:
2 -> nothing
6 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,32 @@
LineBreakpoint created at WithIndex.kt:5
Run Java
Connected to the target VM
WithIndex.kt:5
intArrayOf(1, 2, 3).asSequence()
.withIndex()
.forEach({})
withIndex
before: 1,3,5
after: 2,4,6
forEach
before: 2,4,6
after: nothing
mappings for withIndex
direct:
1 -> 2
3 -> 4
5 -> 6
reverse:
1 <- 2
3 <- 4
5 <- 6
mappings for forEach
direct:
2 -> nothing
4 -> nothing
6 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 2, 3).asSequence().count()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
(0..5).asSequence().chunked(4).count()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 2, 3, 4).chunked(2) { it.size }.count()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
(0..1).asSequence().constrainOnce().count()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
(0..1).asSequence().onEach {}.count()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
(0..1).asSequence().requireNoNulls().count()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
intArrayOf(1, 1, 1, 1, 1, 1, 1).asSequence().windowed(3, transform = { it.sum() }) .count()
}
@@ -0,0 +1,7 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package misc
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 1, 1, 1, 1, 1, 1, 1).windowed(3, 5).count()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
listOf(1, 1, 1, 1, 1).asSequence().windowed(3, partialWindows = true, transform = { it.size }).count()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 1, 1, 1, 1, 1, 1, 1, 1).windowed(4, 2).count()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
listOf(1, 2).asSequence().zip(sequenceOf(2, 1, 5)) { old, new -> old + new }.sum()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 2, 3).zip(sequenceOf(1)).contains(5 to 1)
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 2, 3, 2, 1).zipWithNext { prev, next -> next + prev }.count()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1).zipWithNext().count()
}
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 2).zip(sequenceOf(3, 2)).sumBy { it.second }
}
@@ -0,0 +1,32 @@
LineBreakpoint created at AsSequence.kt:5
Run Java
Connected to the target VM
AsSequence.kt:5
sequenceOf(1, 2, 3)
.asSequence()
.count()
asSequence
before: 1,3,5
after: 2,4,6
count
before: 2,4,6
after: nothing
mappings for asSequence
direct:
1 -> 2
3 -> 4
5 -> 6
reverse:
1 <- 2
3 <- 4
5 <- 6
mappings for count
direct:
2 -> nothing
4 -> nothing
6 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,33 @@
LineBreakpoint created at Chunked.kt:5
Run Java
Connected to the target VM
Chunked.kt:5
(0..5).asSequence()
.chunked(4)
.count()
chunked
before: 1,2,3,4,6,7
after: 5,8
count
before: 5,8
after: nothing
mappings for chunked
direct:
1 -> 5
2 -> 5
3 -> 5
4 -> 5
6 -> 8
7 -> 8
reverse:
1,2,3,4 <- 5
6,7 <- 8
mappings for count
direct:
5 -> nothing
8 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,31 @@
LineBreakpoint created at ChunkedWithTransform.kt:5
Run Java
Connected to the target VM
ChunkedWithTransform.kt:5
sequenceOf(1, 2, 3, 4)
.chunked(2, { it.size })
.count()
chunked
before: 1,2,4,5
after: 3,6
count
before: 3,6
after: nothing
mappings for chunked
direct:
1 -> 3
2 -> 3
4 -> 6
5 -> 6
reverse:
1,2 <- 3
4,5 <- 6
mappings for count
direct:
3 -> nothing
6 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
LineBreakpoint created at ConstrainOnce.kt:5
Run Java
Connected to the target VM
ConstrainOnce.kt:5
(0..1).asSequence()
.constrainOnce()
.count()
constrainOnce
before: 1,3
after: 2,4
count
before: 2,4
after: nothing
mappings for constrainOnce
direct:
1 -> 2
3 -> 4
reverse:
1 <- 2
3 <- 4
mappings for count
direct:
2 -> nothing
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
LineBreakpoint created at OnEach.kt:5
Run Java
Connected to the target VM
OnEach.kt:5
(0..1).asSequence()
.onEach({})
.count()
onEach
before: 1,3
after: 2,4
count
before: 2,4
after: nothing
mappings for onEach
direct:
1 -> 2
3 -> 4
reverse:
1 <- 2
3 <- 4
mappings for count
direct:
2 -> nothing
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
LineBreakpoint created at RequireNoNulls.kt:5
Run Java
Connected to the target VM
RequireNoNulls.kt:5
(0..1).asSequence()
.requireNoNulls()
.count()
requireNoNulls
before: 1,3
after: 2,4
count
before: 2,4
after: nothing
mappings for requireNoNulls
direct:
1 -> 2
3 -> 4
reverse:
1 <- 2
3 <- 4
mappings for count
direct:
2 -> nothing
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,40 @@
LineBreakpoint created at Windowed.kt:5
Run Java
Connected to the target VM
Windowed.kt:5
intArrayOf(1, 1, 1, 1, 1, 1, 1).asSequence()
.windowed(3, transform = { it.sum() })
.count()
windowed
before: 1,2,3,5,7,9,11
after: 4,6,8,10,12
count
before: 4,6,8,10,12
after: nothing
mappings for windowed
direct:
1 -> 4
2 -> 4,6
3 -> 4,6,8
5 -> 6,8,10
7 -> 8,10,12
9 -> nothing
11 -> nothing
reverse:
1,2,3 <- 4
2,3,5 <- 6
3,5,7 <- 8
5,7 <- 10
7 <- 12
mappings for count
direct:
4 -> nothing
6 -> nothing
8 -> nothing
10 -> nothing
12 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,35 @@
LineBreakpoint created at WindowedWithBigStep.kt:6
Run Java
Connected to the target VM
WindowedWithBigStep.kt:6
sequenceOf(1, 1, 1, 1, 1, 1, 1, 1)
.windowed(3, 5)
.count()
windowed
before: 1,2,3,5,6,7,8,9
after: 4,10
count
before: 4,10
after: nothing
mappings for windowed
direct:
1 -> 4
2 -> 4
3 -> 4
5 -> nothing
6 -> nothing
7 -> 10
8 -> 10
9 -> 10
reverse:
1,2,3 <- 4
7,8,9 <- 10
mappings for count
direct:
4 -> nothing
10 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,38 @@
LineBreakpoint created at WindowedWithPartial.kt:5
Run Java
Connected to the target VM
WindowedWithPartial.kt:5
listOf(1, 1, 1, 1, 1).asSequence()
.windowed(3, partialWindows = true, transform = { it.size })
.count()
windowed
before: 1,2,3,5,7
after: 4,6,8,9,10
count
before: 4,6,8,9,10
after: nothing
mappings for windowed
direct:
1 -> 4
2 -> 4,6
3 -> 4,6,8
5 -> 6,8,9
7 -> 8,9,10
reverse:
1,2,3 <- 4
2,3,5 <- 6
3,5,7 <- 8
5,7 <- 9
7 <- 10
mappings for count
direct:
4 -> nothing
6 -> nothing
8 -> nothing
9 -> nothing
10 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,38 @@
LineBreakpoint created at WindowedWithStep.kt:5
Run Java
Connected to the target VM
WindowedWithStep.kt:5
sequenceOf(1, 1, 1, 1, 1, 1, 1, 1, 1)
.windowed(4, 2)
.count()
windowed
before: 1,2,3,4,6,7,9,10,12
after: 5,8,11
count
before: 5,8,11
after: nothing
mappings for windowed
direct:
1 -> 5
2 -> 5
3 -> 5,8
4 -> 5,8
6 -> 8,11
7 -> 8,11
9 -> 11
10 -> 11
12 -> nothing
reverse:
1,2,3,4 <- 5
3,4,6,7 <- 8
6,7,9,10 <- 11
mappings for count
direct:
5 -> nothing
8 -> nothing
11 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
LineBreakpoint created at ZipWithGreater.kt:5
Run Java
Connected to the target VM
ZipWithGreater.kt:5
listOf(1, 2).asSequence()
.zip(sequenceOf(2, 1, 5), { old, new -> old + new })
.sum()
zip
before: 1,3
after: 2,4
sum
before: 2,4
after: nothing
mappings for zip
direct:
1 -> 2
3 -> 4
reverse:
1 <- 2
3 <- 4
mappings for sum
direct:
2 -> nothing
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,26 @@
LineBreakpoint created at ZipWithLesser.kt:5
Run Java
Connected to the target VM
ZipWithLesser.kt:5
sequenceOf(1, 2, 3)
.zip(sequenceOf(1))
.contains(5 to 1)
zip
before: 1
after: 2
contains
before: 2
after: nothing
mappings for zip
direct:
1 -> 2
reverse:
1 <- 2
mappings for contains
direct:
2 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,36 @@
LineBreakpoint created at ZipWithNextMany.kt:5
Run Java
Connected to the target VM
ZipWithNextMany.kt:5
sequenceOf(1, 2, 3, 2, 1)
.zipWithNext({ prev, next -> next + prev })
.count()
zipWithNext
before: 1,2,4,6,8
after: 3,5,7,9
count
before: 3,5,7,9
after: nothing
mappings for zipWithNext
direct:
1 -> 3
2 -> 3,5
4 -> 5,7
6 -> 7,9
8 -> 9
reverse:
1,2 <- 3
2,4 <- 5
4,6 <- 7
6,8 <- 9
mappings for count
direct:
3 -> nothing
5 -> nothing
7 -> nothing
9 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,26 @@
LineBreakpoint created at ZipWithNextSingle.kt:5
Run Java
Connected to the target VM
ZipWithNextSingle.kt:5
sequenceOf(1)
.zipWithNext()
.count()
zipWithNext
before: 1
after: nothing
count
before: nothing
after: nothing
mappings for zipWithNext
direct:
1 -> nothing
reverse:
empty
mappings for count
direct:
empty
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
LineBreakpoint created at ZipWithSame.kt:5
Run Java
Connected to the target VM
ZipWithSame.kt:5
sequenceOf(1, 2)
.zip(sequenceOf(3, 2))
.sumBy({ it.second })
zip
before: 1,3
after: 2,4
sumBy
before: 2,4
after: nothing
mappings for zip
direct:
1 -> 2
3 -> 4
reverse:
1 <- 2
3 <- 4
mappings for sumBy
direct:
2 -> nothing
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,6 @@
package sort
fun main(args: Array<String>) {
//Breakpoint!
intArrayOf(2, 1, 3).asSequence().sorted().toList()
}
@@ -0,0 +1,8 @@
package sort
fun main(args: Array<String>) {
//Breakpoint!
arrayOf(Person("Bob", 42), Person("Alice", 27)).asSequence().sortedBy { it.age }.count()
}
data class Person(val name: String, val age: Int)
@@ -0,0 +1,6 @@
package sort
fun main(args: Array<String>) {
//Breakpoint!
arrayOf(Person("Bob", 42), Person("Alice", 27)).asSequence().sortedByDescending { it.age }.count()
}
@@ -0,0 +1,6 @@
package sort
fun main(args: Array<String>) {
//Breakpoint!
intArrayOf(2, 1, 3).asSequence().sortedDescending().toList()
}
@@ -0,0 +1,7 @@
package sort
fun main(args: Array<String>) {
//Breakpoint!
arrayOf(Person("Bob", 42), Person("Alice", 27)).asSequence()
.sortedWith(compareBy { it.name }).count()
}
@@ -0,0 +1,32 @@
LineBreakpoint created at Sorted.kt:5
Run Java
Connected to the target VM
Sorted.kt:5
intArrayOf(2, 1, 3).asSequence()
.sorted()
.toList()
sorted
before: 1,2,3
after: 4,5,6
toList
before: 4,5,6
after: nothing
mappings for sorted
direct:
1 -> 5
2 -> 4
3 -> 6
reverse:
2 <- 4
1 <- 5
3 <- 6
mappings for toList
direct:
4 -> nothing
5 -> nothing
6 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
LineBreakpoint created at SortedBy.kt:5
Run Java
Connected to the target VM
SortedBy.kt:5
arrayOf(Person("Bob", 42), Person("Alice", 27)).asSequence()
.sortedBy({ it.age })
.count()
sortedBy
before: 1,2
after: 3,4
count
before: 3,4
after: nothing
mappings for sortedBy
direct:
1 -> 4
2 -> 3
reverse:
2 <- 3
1 <- 4
mappings for count
direct:
3 -> nothing
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
LineBreakpoint created at SortedByDescending.kt:5
Run Java
Connected to the target VM
SortedByDescending.kt:5
arrayOf(Person("Bob", 42), Person("Alice", 27)).asSequence()
.sortedByDescending({ it.age })
.count()
sortedByDescending
before: 1,2
after: 3,4
count
before: 3,4
after: nothing
mappings for sortedByDescending
direct:
1 -> nothing
2 -> nothing
reverse:
nothing <- 3
nothing <- 4
mappings for count
direct:
3 -> nothing
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,32 @@
LineBreakpoint created at SortedDescending.kt:5
Run Java
Connected to the target VM
SortedDescending.kt:5
intArrayOf(2, 1, 3).asSequence()
.sortedDescending()
.toList()
sortedDescending
before: 1,2,3
after: 4,5,6
toList
before: 4,5,6
after: nothing
mappings for sortedDescending
direct:
1 -> 5
2 -> 6
3 -> 4
reverse:
3 <- 4
1 <- 5
2 <- 6
mappings for toList
direct:
4 -> nothing
5 -> nothing
6 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,29 @@
LineBreakpoint created at SortedWith.kt:5
Run Java
Connected to the target VM
SortedWith.kt:5
arrayOf(Person("Bob", 42), Person("Alice", 27)).asSequence()
.sortedWith(compareBy { it.name })
.count()
sortedWith
before: 1,2
after: 3,4
count
before: 3,4
after: nothing
mappings for sortedWith
direct:
1 -> 4
2 -> 3
reverse:
2 <- 3
1 <- 4
mappings for count
direct:
3 -> nothing
4 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,6 @@
package terminal
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1,2,3).all { it % 2 == 1 }
}
@@ -0,0 +1,6 @@
package terminal
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1,2,3).all { it < 5 }
}
@@ -0,0 +1,6 @@
package terminal
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1,2,3).any { it > 5 }
}
@@ -0,0 +1,6 @@
package terminal
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 2, 3, 4).any { it == 3 }
}
@@ -0,0 +1,6 @@
package terminal
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1,2,3).onEach { print(1) }.asIterable()
}
@@ -0,0 +1,6 @@
package terminal
fun main(args: Array<String>) {
//Breakpoint!
sequenceOf(1, 2).associate { it to it * it }
}

Some files were not shown because too many files have changed in this diff Show More