Minor: cleanup in testdata

This commit is contained in:
Vitaliy.Bibaev
2017-11-06 21:19:21 +03:00
parent f0236e1ad1
commit 2aebd0fac4
58 changed files with 2 additions and 205 deletions
@@ -1,3 +0,0 @@
fun main(args: Array<String>) {
<caret>val toArray = listOf(1,2,3).map{it * it}
}
@@ -1,5 +0,0 @@
import java.util.stream.Stream
fun main(args: Array<String>) {
val toArray = <caret>Stream.of(1, 2, 3, 4).map { it % 2 == 0 }.toArray()
}
@@ -1,3 +0,0 @@
fun main(args: Array<String>) {
val toAr<caret>ray = listOf(1, 2, 3).asSequence().filter { it % 2 == 1 }.map { it * it }.toList()
}
@@ -4,6 +4,6 @@ public class InLambda {
public static void main(String[] args) {
<caret> Runnable a = () -> {
Stream.of(1,2).count();
}
};
}
}
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.util.function.Consumer;
import java.util.stream.Stream;
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.util.function.Consumer;
import java.util.stream.Stream;
@@ -1,18 +1,3 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.util.function.Consumer;
import java.util.stream.Stream;
@@ -3,7 +3,7 @@ import java.util.stream.Stream;
public class Bar {
public static void main(String[] args) {
final String var = "abd"
final String var = "abd";
final long count = Stream.of(va<caret>r, "acd", "ef").map(String::length).filter(x -> x % 2 == 0).peek(new Consumer<Integer>() {
@Override
public void accept(Integer x) {
@@ -1 +0,0 @@
val array: kotlin.DoubleArray = kotlin.doubleArrayOf(10.0, 20.0)
@@ -1 +0,0 @@
val a: kotlin.IntArray
@@ -1 +0,0 @@
val array: kotlin.IntArray = kotlin.IntArray(10)
@@ -1,2 +0,0 @@
a[0] = 1
a[1] = 2
@@ -1,2 +0,0 @@
a[10]!!
a[11]!!
@@ -1,2 +0,0 @@
var a: kotlin.Int
a = 100
@@ -1 +0,0 @@
this.method()
@@ -1 +0,0 @@
this.method(10, 20, 30)
@@ -1 +0,0 @@
this.method(10)
@@ -1,2 +0,0 @@
var a: kotlin.Int = 10
a
@@ -1 +0,0 @@
var a: kotlin.Int
@@ -1 +0,0 @@
var a: kotlin.Int
@@ -1 +0,0 @@
val a: kotlin.Int = 10
@@ -1,4 +0,0 @@
val objects: kotlin.collections.MutableList<kotlin.Any> = getObjects()
for (object in objects) {
object.toString()
}
@@ -1,6 +0,0 @@
val objects: kotlin.collections.MutableList<kotlin.Any> = getObjects()
var i: kotlin.Int = 0
while (i < objects.size()) {
i.toString()
i++
}
@@ -1,3 +0,0 @@
if (true) {
receiver.success()
}
@@ -1,5 +0,0 @@
if (false) {
this.success()
} else {
this.fail()
}
@@ -1,7 +0,0 @@
if (false) {
this.success()
} else {
if (true) {
this.failSuccess()
}
}
@@ -1,9 +0,0 @@
if (false) {
this.success()
} else {
if (true) {
this.failSuccess()
} else {
this.failFail()
}
}
@@ -1,4 +0,0 @@
{ y ->
y.method1()
y
}
@@ -1,3 +0,0 @@
{ y ->
y
}
@@ -1,4 +0,0 @@
{ y ->
y.method1()
y.method2()
}
@@ -1,3 +0,0 @@
{ x ->
x.method()
}
@@ -1 +0,0 @@
var map: kotlin.collections.MutableMap<kotlin.Int, kotlin.Boolean>
@@ -1 +0,0 @@
val map: kotlin.collections.MutableMap<kotlin.Int, kotlin.Boolean> = kotlin.collections.linkedMapOf()
@@ -1 +0,0 @@
var lst: kotlin.collections.MutableList<kotlin.Int>
@@ -1,5 +0,0 @@
val lst: kotlin.collections.MutableList<kotlin.Long> = kotlin.collections.mutableListOf()
lst.add(100)
lst.get(0).methodWithSideEffect()
lst.set(1, lst.get(0))
lst.contains(lst.size)
@@ -1,4 +0,0 @@
val objects: kotlin.collections.MutableList<kotlin.Any> = getObjects()
for (object in objects) {
break
}
@@ -1,6 +0,0 @@
val objects: kotlin.collections.MutableList<kotlin.Any> = getObjects()
for (object in objects) {
if (object.isEmpty) {
break
}
}
@@ -1,3 +0,0 @@
map.getOrPut(key, { y ->
map.method()
}
@@ -1 +0,0 @@
key in map
@@ -1,13 +0,0 @@
var resultArray: kotlin.Array<kotlin.Any?> = arrayOfNulls<kotlin.Any>(0)
run {
val size: kotlin.Int = map.size
val keys: kotlin.IntArray = kotlin.IntArray(size)
val values: kotlin.Array<kotlin.Any?> = kotlin.arrayOfNulls(size)
var i: kotlin.Int = 0
for (key in map.keys) {
keys[i] = key
values[i] = map[key]
i++
}
resultArray = kotlin.arrayOf<kotlin.Any?>(keys, values)
}
@@ -1 +0,0 @@
val map: kotlin.collections.MutableMap<kotlin.Int, kotlin.Boolean>
@@ -1 +0,0 @@
map[key]
@@ -1 +0,0 @@
val map: kotlin.collections.MutableMap<kotlin.Int, kotlin.Int> = kotlin.collections.mutableMapOf()
@@ -1 +0,0 @@
map[key] = value
@@ -1,2 +0,0 @@
val a: kotlin.Int = 10
val b: kotlin.Int = 20
@@ -1,2 +0,0 @@
val a: kotlin.Int = 10
val b: kotlin.Int = 20
@@ -1 +0,0 @@
!lst.contains(1)
@@ -1,6 +0,0 @@
var a: kotlin.Int
if (true) {
a = 100
} else {
a = 200
}
@@ -1,6 +0,0 @@
run {
this.method()
run {
this.method()
}
}
@@ -1 +0,0 @@
lst = kotlin.collections.mutableListOf<kotlin.Int>(0, 1, 2, 3)
@@ -1,6 +0,0 @@
val usualType: kotlin.Any
val nullableType: kotlin.Any?
val arrayWithNullableElements: kotlin.Array<kotlin.Any?>
val nullableArrayWithNullableElements: kotlin.Array<kotlin.Any?>?
val nullableList: kotlin.collections.MutableList<kotlin.Boolean>?
val mapWithNullableValues: kotlin.collections.MutableMap<kotlin.Int, kotlin.Any?>
@@ -1 +0,0 @@
a.myProperty
@@ -1,3 +0,0 @@
run {
this.method()
}
@@ -1 +0,0 @@
arrayOfNulls<kotlin.String>(100)
@@ -1 +0,0 @@
val time: java.util.concurrent.atomic.AtomicInteger = java.util.concurrent.atomic.AtomicInteger()
@@ -1,5 +0,0 @@
try {
this.hashCode()
} catch(e : kotlin.Throwable) {
this.fail()
}
@@ -1,2 +0,0 @@
var a: kotlin.Int = 100
val b: kotlin.Int = a
@@ -1,6 +0,0 @@
import java.util.stream.Stream
fun main(args: Array<String>) {
// Breakpoint!
val toArray = Stream.of(1, 2, 3, 4).map { it % 2 == 0 }.toArray()
}